-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
35 lines (34 loc) · 900 Bytes
/
webpack.config.js
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
const path = require('path');
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
module.exports = {
entry: {
'bundle': [path.resolve(__dirname, 'src/index.ts')],
'loader': [path.resolve(__dirname, 'src/loader.ts')],
'polyfill' : [path.resolve(__dirname, 'src/polyfills.ts')]
},
context: __dirname,
output: {
filename: '[name].js',
path: path.resolve(__dirname, 'dist'),
},
devtool: "source-map",
mode: "production",
resolve: {
extensions: ['.ts', '.tsx', '.js', '.json']
},
module: {
rules: [{test: /\.tsx?$/, loader: 'ts-loader'}],
},
plugins: [
new ForkTsCheckerWebpackPlugin()
],
devServer: {
static: {
directory: path.join(__dirname, ''),
},
headers: {
'Service-Worker-Allowed': '/'
},
port: 4200
}
};