File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
packages/@vue/cli-service/lib/webpack Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ class ModernModePlugin {
24
24
compilation . hooks . htmlWebpackPluginAlterAssetTags . tapAsync ( ID , async ( data , cb ) => {
25
25
// get stats, write to disk
26
26
await fs . ensureDir ( this . targetDir )
27
- const htmlName = data . plugin . options . filename
27
+ const htmlName = path . basename ( data . plugin . options . filename )
28
28
const tempFilename = path . join ( this . targetDir , `legacy-assets-${ htmlName } .json` )
29
29
await fs . writeFile ( tempFilename , JSON . stringify ( data . body ) )
30
30
cb ( )
@@ -51,7 +51,7 @@ class ModernModePlugin {
51
51
} )
52
52
53
53
// inject links for legacy assets as <script nomodule>
54
- const htmlName = data . plugin . options . filename
54
+ const htmlName = path . basename ( data . plugin . options . filename )
55
55
const tempFilename = path . join ( this . targetDir , `legacy-assets-${ htmlName } .json` )
56
56
const legacyAssets = JSON . parse ( await fs . readFile ( tempFilename , 'utf-8' ) )
57
57
. filter ( a => a . tagName === 'script' )
You can’t perform that action at this time.
0 commit comments