-
Notifications
You must be signed in to change notification settings - Fork 9
/
webpack.config.dev.js
41 lines (40 loc) · 1.11 KB
/
webpack.config.dev.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
36
37
38
39
40
41
const common = require('./webpack.config.common.js');
const webpack = require('webpack');
const path = require('path');
const merge = require('webpack-merge');
const nodeExternals = require('webpack-node-externals');
module.exports = merge(common, {
mode: 'development',
entry: {
index: ['webpack/hot/poll?100', './src/index.ts'],
migrate: ['./src/utility/migrate.ts']
},
externals: [
nodeExternals({
whitelist: ['webpack/hot/poll?100']
})
],
devtool: 'inline-source-map',
module: {
rules: [
{
test: /.tsx?$/,
include: path.resolve(__dirname, 'src'),
exclude: /node_modules/,
use: [
{
loader: 'ts-loader',
options: {
transpileOnly: true,
experimentalWatchApi: true,
},
}
]
}
]
},
plugins: [
new webpack.HotModuleReplacementPlugin()
],
watch: true
});