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 {
2424 compilation . hooks . htmlWebpackPluginAlterAssetTags . tapAsync ( ID , async ( data , cb ) => {
2525 // get stats, write to disk
2626 await fs . ensureDir ( this . targetDir )
27- const htmlName = data . plugin . options . filename
27+ const htmlName = path . basename ( data . plugin . options . filename )
2828 const tempFilename = path . join ( this . targetDir , `legacy-assets-${ htmlName } .json` )
2929 await fs . writeFile ( tempFilename , JSON . stringify ( data . body ) )
3030 cb ( )
@@ -51,7 +51,7 @@ class ModernModePlugin {
5151 } )
5252
5353 // inject links for legacy assets as <script nomodule>
54- const htmlName = data . plugin . options . filename
54+ const htmlName = path . basename ( data . plugin . options . filename )
5555 const tempFilename = path . join ( this . targetDir , `legacy-assets-${ htmlName } .json` )
5656 const legacyAssets = JSON . parse ( await fs . readFile ( tempFilename , 'utf-8' ) )
5757 . filter ( a => a . tagName === 'script' )
You can’t perform that action at this time.
0 commit comments