-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathwebpack.config.ts
More file actions
31 lines (29 loc) · 793 Bytes
/
webpack.config.ts
File metadata and controls
31 lines (29 loc) · 793 Bytes
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
import path from 'path';
import type { Configuration } from 'webpack';
import HtmlWebpackPlugin from 'html-webpack-plugin';
import Self from '../../../dist';
const config: Configuration = {
mode: 'production',
entry: {
index: path.join(__dirname, './fixtures/index.js'),
page2: path.join(__dirname, './fixtures/page2.js')
},
output: {
path: path.join(__dirname, './dist'),
filename: '[name].js'
},
plugins: [
new HtmlWebpackPlugin({
template: path.resolve(__dirname, './fixtures/index.html'),
filename: 'index.html'
}),
new HtmlWebpackPlugin({
template: path.resolve(__dirname, './fixtures/page2.html'),
filename: 'page2.html'
}),
new Self({
htmlMatchPattern: [/index.html$/]
})
]
};
export default config;