-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathwebpack.dev.config.js
More file actions
48 lines (41 loc) · 1.04 KB
/
webpack.dev.config.js
File metadata and controls
48 lines (41 loc) · 1.04 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
const { WatchIgnorePlugin, NamedModulesPlugin } = require('webpack');
const merge = require('webpack-merge');
const convert = require('koa-connect');
const history = require('connect-history-api-fallback');
const webpackServeWaitPage = require('webpack-serve-waitpage');
const common = require('./webpack.common.config');
module.exports = merge(common, {
mode: 'development',
devtool: 'inline-source-map',
serve: {
port: 8080,
content: [__dirname],
devMiddleware: {
stats: {
all: false,
assets: true,
builtAt: true,
excludeAssets: /\.(mp3|jpg|png)/,
colors: true,
errors: true,
errorDetails: true,
hash: true,
moduleTrace: true,
timings: true,
version: true,
warnings: true,
},
},
add(app, middleware, options) {
app.use(webpackServeWaitPage(options));
app.use(convert(history()));
},
},
plugins: [
new WatchIgnorePlugin([
/\.js$/,
/\.d\.ts$/,
]),
new NamedModulesPlugin(),
],
});