-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathwebpack.dev.js
33 lines (29 loc) · 870 Bytes
/
webpack.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
const {merge} = require('webpack-merge');
const common = require('./webpack.common.js');
const path = require('node:path');
const devServerOptions = {
devServer: {
open: 'index.html',
port: 9999,
// host: '127.0.0.1',
static: [
{
directory: path.resolve(__dirname, "dev")
},
{
directory: path.resolve(__dirname, "test/e2e/creative")
}
],
devMiddleware: {
publicPath: "/bundle/",
}
}
};
// From https://webpack.js.org/configuration/dev-server/
// "Be aware that when exporting multiple configurations only the devServer options for the first configuration will be
// taken into account and used for all the configurations in the array."
common[0] = merge(common[0], devServerOptions);
module.exports = common.map(c => merge(c, {
mode: 'development',
devtool: 'inline-source-map',
}));