-
Notifications
You must be signed in to change notification settings - Fork 319
/
webpack.dev.js
36 lines (33 loc) · 930 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
34
35
36
const Webpack = require("webpack");
const {GitRevisionPlugin} = require("git-revision-webpack-plugin");
const {merge} = require("webpack-merge");
const git = new GitRevisionPlugin();
const common = require("./webpack.config.js");
module.exports = [
merge(common[0], {
mode: "development",
optimization: {minimize: false},
devtool: 'inline-source-map',
performance: {
hints: false,
},
devServer: {
static: common[0].output.path,
compress: false,
historyApiFallback: true,
hot: true,
https: false
},
plugins: [
new Webpack.DefinePlugin({
"VERSION": JSON.stringify(require("./package.json").version),
"TIMESTAMP": JSON.stringify(new Date().toISOString()),
"REPOSITORY_BRANCH": JSON.stringify(git.branch()),
"REPOSITORY_COMMIT": JSON.stringify(git.commithash()),
"DEVELOPMENT": JSON.stringify(true)
}),
new Webpack.HotModuleReplacementPlugin()
]
}),
common[1]
];