@@ -39,6 +39,17 @@ export function getBrowserConfig(wco: WebpackConfigOptions) {
39
39
}
40
40
}
41
41
42
+ if ( buildOptions . index ) {
43
+ extraPlugins . push ( new IndexHtmlWebpackPlugin ( {
44
+ input : path . resolve ( root , buildOptions . index ) ,
45
+ output : path . basename ( buildOptions . index ) ,
46
+ baseHref : buildOptions . baseHref ,
47
+ entrypoints : generateEntryPoints ( buildOptions ) ,
48
+ deployUrl : buildOptions . deployUrl ,
49
+ sri : buildOptions . subresourceIntegrity ,
50
+ } ) ) ;
51
+ }
52
+
42
53
if ( buildOptions . subresourceIntegrity ) {
43
54
extraPlugins . push ( new SubresourceIntegrityPlugin ( {
44
55
hashFuncNames : [ 'sha384' ]
@@ -102,16 +113,7 @@ export function getBrowserConfig(wco: WebpackConfigOptions) {
102
113
}
103
114
}
104
115
} ,
105
- plugins : extraPlugins . concat ( [
106
- new IndexHtmlWebpackPlugin ( {
107
- input : path . resolve ( root , buildOptions . index ) ,
108
- output : path . basename ( buildOptions . index ) ,
109
- baseHref : buildOptions . baseHref ,
110
- entrypoints : generateEntryPoints ( buildOptions ) ,
111
- deployUrl : buildOptions . deployUrl ,
112
- sri : buildOptions . subresourceIntegrity ,
113
- } ) ,
114
- ] ) ,
116
+ plugins : extraPlugins ,
115
117
node : false ,
116
118
} ;
117
119
}
0 commit comments