forked from JetBrains/websandbox
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack-examples.config.js
More file actions
51 lines (49 loc) · 1.35 KB
/
webpack-examples.config.js
File metadata and controls
51 lines (49 loc) · 1.35 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
44
45
46
47
48
49
50
51
/* eslint-env node */
const HtmlWebpackPlugin = require('html-webpack-plugin');
const baseConfig = require('./webpack.config');
module.exports = {
mode: 'development',
entry: {
simple: './examples/simple/simple',
style: './examples/style/style',
importScript: './examples/importScript/importScript',
scriptToImport: './examples/importScript/scriptToImport'
},
output: {
path: __dirname + '/dist-examples',
filename: '[name].js'
},
module: {
rules: [
{
test: /\.ts$/,
loader: 'ts-loader',
options: {}
},
]
},
resolve: {
extensions: ['.ts', '.js'],
},
plugins: [
new HtmlWebpackPlugin({
inject: false,
template: 'examples/index.html'
}),
new HtmlWebpackPlugin({
filename: 'simple.html',
template: 'examples/simple/simple.html',
chunks: ['simple']
}),
new HtmlWebpackPlugin({
filename: 'style.html',
template: 'examples/style/style.html',
chunks: ['style']
}),
new HtmlWebpackPlugin({
filename: 'importScript.html',
template: 'examples/importScript/importScript.html',
chunks: ['importScript']
})
]
};