From f1a95c8af88cfd8848e2104eaad63e2b8167d628 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Sun, 16 Aug 2020 18:02:10 +0100 Subject: [PATCH] fix(vue-renderer): apply `nomodule` to legacy chunks (#7928) closes #7927 --- packages/vue-renderer/src/renderers/modern.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/vue-renderer/src/renderers/modern.js b/packages/vue-renderer/src/renderers/modern.js index 8bf5b5adc5..a7551f981c 100644 --- a/packages/vue-renderer/src/renderers/modern.js +++ b/packages/vue-renderer/src/renderers/modern.js @@ -48,7 +48,7 @@ export default class ModernRenderer extends SSRRenderer { const scripts = super.renderScripts(renderContext) if (this.isServerMode) { - return scripts.replace(']*?src="([^"]*?)" defer><\/script>/g @@ -57,7 +57,7 @@ export default class ModernRenderer extends SSRRenderer { const legacyJsFile = jsFile.replace(this.publicPath, '') const modernJsFile = this.assetsMapping[legacyJsFile] if (!modernJsFile) { - return scriptTag + return scriptTag.replace('