-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.dev.config.js
54 lines (51 loc) · 1.06 KB
/
webpack.dev.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
const resolve = require('path').resolve
const WebpackShellPlugin = require('webpack-shell-plugin')
const libraryName = 'est'
module.exports = {
entry: './src/index.js',
target: 'node',
output: {
path: resolve(__dirname, 'lib'),
filename: `${libraryName}.dev.js`,
library: libraryName,
libraryTarget: 'commonjs2'
},
externals: {
'sanitize-html': {
commonjs: 'sanitize-html',
commonjs2: 'sanitize-html'
},
'asty': {
commonjs: 'asty',
commonjs2: 'asty'
}
},
resolveLoader: {
modules: [
resolve(__dirname, 'loaders'),
'node_modules'
]
},
module: {
noParse: /node_modules\/pegjs-util\/PEGUtil\.js/,
rules: [
{
test: /\.pegjs$/,
loader: 'pegjs-loader',
options: {
cache: false,
trace: true,
dependencies: {
T: './tokenTypes.js'
}
}
}
]
},
plugins: [
new WebpackShellPlugin({
onBuildEnd: ['node_modules/.bin/ava --watch -v --no-power-assert']
})
],
watch: true
}