@@ -18,6 +18,7 @@ const skipDLLs =
18
18
module . parent ?. filename . includes ( 'webpack.config.renderer.dev.dll' ) ||
19
19
module . parent ?. filename . includes ( 'webpack.config.eslint' ) ;
20
20
21
+ const htmlPagesNames = [ 'splash.ejs' , 'index.ejs' ]
21
22
/**
22
23
* Warn if the DLL is not built
23
24
*/
@@ -51,22 +52,14 @@ const configuration: webpack.Configuration = {
51
52
] ,
52
53
53
54
output : {
54
- path : webpackPaths . electronPath ,
55
+ path : webpackPaths . desktopPath ,
55
56
publicPath : '/' ,
56
57
filename : 'renderer.dev.js' ,
57
58
library : {
58
59
type : 'umd' ,
59
60
} ,
60
61
} ,
61
62
62
- resolve : {
63
- alias : {
64
- src : webpackPaths . apiSrcPath ,
65
- apiSrc : webpackPaths . apiSrcPath ,
66
- uiSrc : webpackPaths . uiSrcPath ,
67
- } ,
68
- } ,
69
-
70
63
module : {
71
64
rules : [
72
65
{
@@ -241,19 +234,21 @@ const configuration: webpack.Configuration = {
241
234
242
235
new MonacoWebpackPlugin ( { languages : [ 'json' ] , features : [ '!rename' ] } ) ,
243
236
244
- new HtmlWebpackPlugin ( {
245
- filename : path . join ( 'index.html' ) ,
246
- template : path . join ( webpackPaths . electronPath , 'index.ejs' ) ,
247
- minify : {
248
- collapseWhitespace : true ,
249
- removeAttributeQuotes : true ,
250
- removeComments : true ,
251
- } ,
252
- isBrowser : false ,
253
- env : process . env . NODE_ENV ,
254
- isDevelopment : process . env . NODE_ENV !== 'production' ,
255
- nodeModules : webpackPaths . appNodeModulesPath ,
256
- } ) ,
237
+ ...htmlPagesNames . map ( ( htmlPageName ) => (
238
+ new HtmlWebpackPlugin ( {
239
+ filename : path . join ( `${ htmlPageName . split ( '.' ) ?. [ 0 ] } .html` ) ,
240
+ template : path . join ( webpackPaths . desktopPath , htmlPageName ) ,
241
+ minify : {
242
+ collapseWhitespace : true ,
243
+ removeAttributeQuotes : true ,
244
+ removeComments : true ,
245
+ } ,
246
+ isBrowser : false ,
247
+ env : process . env . NODE_ENV ,
248
+ isDevelopment : process . env . NODE_ENV !== 'production' ,
249
+ nodeModules : webpackPaths . appNodeModulesPath ,
250
+ } )
251
+ ) ) ,
257
252
258
253
new webpack . DefinePlugin ( {
259
254
'process.env.NODE_ENV' : JSON . stringify ( 'development' ) ,
0 commit comments