fix(renderer): missing nomodule on legacy modules

This commit is contained in:
Clark Du 2020-08-18 20:25:05 +01:00
parent 349fb37bda
commit d1718230ed

View File

@ -62,7 +62,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('<script', '<script nomodule')
}
const moduleTag = scriptTag
.replace('<script', '<script type="module"')