-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.js
More file actions
43 lines (42 loc) · 1.22 KB
/
webpack.config.js
File metadata and controls
43 lines (42 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
const HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
entry: {
background: './windows/background/background.ts',
desktop: './windows/desktop/desktop.ts',
in_game: './windows/in_game/in_game.ts'
},
devtool: 'inline-source-map',
module: {
rules: [
{
test: /\.(ts|js)?$/,
use: 'ts-loader',
exclude: /node_modules/
}
]
},
resolve: {
extensions: ['.ts', '.js'],
},
output: {
path: `${__dirname}/dist`,
filename: '[name]/[name].js'
},
plugins: [
new HtmlWebpackPlugin({
template: './windows/background/background.html',
filename: `${__dirname}/dist/background/background.html`,
chunks: ['background']
}),
new HtmlWebpackPlugin({
template: './windows/desktop/desktop.html',
filename: `${__dirname}/dist/desktop/desktop.html`,
chunks: ['desktop']
}),
new HtmlWebpackPlugin({
template: './windows/in_game/in_game.html',
filename: `${__dirname}/dist/in_game/in_game.html`,
chunks: ['in_game']
})
]
}