File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ class InlineChunkHtmlPlugin {
17
17
if ( tag . tagName !== 'script' || ! ( tag . attributes && tag . attributes . src ) ) {
18
18
return tag ;
19
19
}
20
- const scriptName = tag . attributes . src . replace ( publicPath , '' ) ;
20
+ const scriptName = publicPath ? tag . attributes . src . replace ( publicPath , '' ) : tag . attributes . src ;
21
21
if ( ! this . tests . some ( test => scriptName . match ( test ) ) ) {
22
22
return tag ;
23
23
}
@@ -29,8 +29,8 @@ class InlineChunkHtmlPlugin {
29
29
}
30
30
31
31
apply ( compiler ) {
32
- let publicPath = compiler . options . output . publicPath ;
33
- if ( ! publicPath . endsWith ( '/' ) ) {
32
+ let publicPath = compiler . options . output . publicPath || '' ;
33
+ if ( publicPath && ! publicPath . endsWith ( '/' ) ) {
34
34
publicPath += '/' ;
35
35
}
36
36
You can’t perform that action at this time.
0 commit comments