From ecf76d91f1bec8dcab8f2c7715e0e07a19d0b6fe Mon Sep 17 00:00:00 2001 From: Clark Du Date: Tue, 8 Jan 2019 13:20:48 +0000 Subject: [PATCH] fix: SafariFix is not injected in client modern mode --- packages/webpack/src/plugins/vue/modern.js | 13 ++++++------- test/unit/modern.client.test.js | 5 +++++ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/packages/webpack/src/plugins/vue/modern.js b/packages/webpack/src/plugins/vue/modern.js index 0365824b7d..0593429dc1 100644 --- a/packages/webpack/src/plugins/vue/modern.js +++ b/packages/webpack/src/plugins/vue/modern.js @@ -77,13 +77,6 @@ export default class ModernModePlugin { } }) - // inject Safari 10 nomodule fix - data.body.push({ - tagName: 'script', - closeTag: true, - innerHTML: ModernModePlugin.safariFix - }) - // inject links for legacy assets as ${match}` + ) }) }) } diff --git a/test/unit/modern.client.test.js b/test/unit/modern.client.test.js index 17af063ab0..4f2ca88264 100644 --- a/test/unit/modern.client.test.js +++ b/test/unit/modern.client.test.js @@ -39,6 +39,11 @@ describe('modern client mode (SSR)', () => { ].join(', ')) }) + test('should contain safari fix script', async () => { + const response = await rp(url('/')) + expect(response).toContain('"noModule"') + }) + // Close server and ask nuxt to stop listening to file changes afterAll(async () => { await nuxt.close()