forked from standardnotes/app
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.dev.js
More file actions
32 lines (31 loc) · 769 Bytes
/
webpack.dev.js
File metadata and controls
32 lines (31 loc) · 769 Bytes
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
const { merge } = require('webpack-merge');
const config = require('./webpack.config.js');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const mergeWithEnvDefaults = require('./webpack-defaults.js');
module.exports = (env, argv) => {
const port = argv.port || 3001;
mergeWithEnvDefaults(env);
return merge(config(env, argv), {
mode: 'development',
optimization: {
minimize: false,
},
plugins: [
new HtmlWebpackPlugin({
template: './index.html',
inject: true,
templateParameters: {
env: process.env,
},
}),
],
devServer: {
hot: 'only',
static: './public',
port,
devMiddleware: {
writeToDisk: argv.writeToDisk,
},
},
});
};