From 92a6e85fe7679b47bb61f7ff6bc757c7ee75a440 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 27 Feb 2023 15:18:47 +0100 Subject: [PATCH] Breaking: remove ios 11, safari 11 support Angular doesn't support these web browsers anymore Safari 11 and iOS 11 are not supported anymore by Apple --- client/.browserslistrc | 4 ++++ client/e2e/wdio.browserstack.conf.ts | 4 ++-- client/src/main.ts | 14 +++++++++++++- client/webpack/webpack.video-embed.js | 4 ++-- 4 files changed, 21 insertions(+), 5 deletions(-) create mode 100644 client/.browserslistrc diff --git a/client/.browserslistrc b/client/.browserslistrc new file mode 100644 index 000000000..9eb6a61de --- /dev/null +++ b/client/.browserslistrc @@ -0,0 +1,4 @@ +last 1 Chrome version +last 2 Edge major versions +Firefox ESR +ios_saf >= 13.1 diff --git a/client/e2e/wdio.browserstack.conf.ts b/client/e2e/wdio.browserstack.conf.ts index 944df8bdd..b40de8fa3 100644 --- a/client/e2e/wdio.browserstack.conf.ts +++ b/client/e2e/wdio.browserstack.conf.ts @@ -64,7 +64,7 @@ module.exports = { }, { browserName: 'Safari', - browserVersion: '11.1', + browserVersion: '12.1', ...buildBStackDesktopOptions('Safari Desktop', '1280x1024') }, @@ -87,7 +87,7 @@ module.exports = { { browserName: 'Safari', - ...buildBStackMobileOptions('Safari iPhone', 'iPhone SE', '11') + ...buildBStackMobileOptions('Safari iPhone', 'iPhone 7', '12') }, { browserName: 'Safari', diff --git a/client/src/main.ts b/client/src/main.ts index 432db0eac..159c47e86 100644 --- a/client/src/main.ts +++ b/client/src/main.ts @@ -25,7 +25,19 @@ const bootstrap = () => platformBrowserDynamic() return bootstrapModule }) .catch(err => { - logger.error(err) + try { + logger.error(err) + } catch (err2) { + console.error('Cannot log error', { err, err2 }) + } + + // Ensure we display an "incompatible message" on Angular bootstrap error + setTimeout(() => { + if (document.querySelector('my-app').innerHTML === '') { + throw err + } + }, 1000) + return null }) diff --git a/client/webpack/webpack.video-embed.js b/client/webpack/webpack.video-embed.js index 120eedade..e25677872 100644 --- a/client/webpack/webpack.video-embed.js +++ b/client/webpack/webpack.video-embed.js @@ -179,7 +179,7 @@ module.exports = function () { ecma: 6, warnings: false, ie8: false, - safari10: true, + safari10: false, mangle: true, compress: { passes: 3, @@ -214,7 +214,7 @@ function getBabelLoader () { presets: [ [ '@babel/preset-env', { - targets: 'last 1 Chrome version, last 2 Edge major versions, Firefox ESR, Safari >= 11, ios_saf >= 11' + targets: 'last 1 Chrome version, last 2 Edge major versions, Firefox ESR, Safari >= 12, ios_saf >= 12' } ] ]