Vanessa 2023-01-26 18:53:57 +08:00
parent 9e52b489a7
commit d333088288
10 changed files with 109 additions and 38 deletions

View file

@ -19,6 +19,7 @@ module.exports = (env, argv) => {
},
entry: {
'main': './src/index.ts',
'window': './src/window.ts',
},
resolve: {
extensions: ['.ts', '.js', '.tpl', '.scss', '.png', '.svg'],
@ -41,7 +42,8 @@ module.exports = (env, argv) => {
{
test: /\.tpl/,
include: [
path.resolve(__dirname, 'src/assets/template/app/index.tpl')],
path.resolve(__dirname, 'src/assets/template/app/index.tpl'),
path.resolve(__dirname, 'src/assets/template/app/window.tpl')],
loader: 'html-loader',
options: {
sources: false,
@ -117,6 +119,12 @@ module.exports = (env, argv) => {
filename: 'index.html',
template: 'src/assets/template/app/index.tpl',
}),
new HtmlWebpackPlugin({
inject: 'head',
chunks: ['window'],
filename: 'window.html',
template: 'src/assets/template/app/window.tpl',
}),
],
}
}