forked from cagov/unemployment
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.dev.config.js
33 lines (31 loc) · 1002 Bytes
/
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
const { merge } = require("webpack-merge");
const common = require("./webpack.common.config.js");
const path = require("path");
const webpack = require("webpack");
const { I18NextHMRPlugin } = require("i18next-hmr/plugin");
// 👀 Webpack will run in watch mode and compile client-side JS files when they change
module.exports = merge(common, {
mode: "development",
entry: {
client: [
path.join(__dirname, "src/client/index.js"),
"webpack-hot-middleware/client?path=/__webpack_hmr&reload=true",
],
},
devtool: "eval-cheap-module-source-map", // https://webpack.js.org/configuration/devtool/
output: {
hotUpdateChunkFilename: ".hot/hot-update.js",
hotUpdateMainFilename: ".hot/hot-update.json",
},
plugins: [
new webpack.HotModuleReplacementPlugin(),
new I18NextHMRPlugin({
localesDir: path.resolve(__dirname, "src/data/locales"),
}),
],
stats: "errors-warnings",
watch: true,
watchOptions: {
ignored: "/node_modules",
},
});