-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.dev.js
More file actions
30 lines (29 loc) · 842 Bytes
/
webpack.dev.js
File metadata and controls
30 lines (29 loc) · 842 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
const path = require("path");
const merge = require("webpack-merge");
const exec = require("child_process").exec;
const WatchPlugin = require("webpack-watch-files-plugin").default;
const ShellPlugin = require("webpack-shell-plugin");
const common = require("./webpack.common.js");
module.exports = merge(common, {
mode: "development",
watch: true,
devServer: {
contentBase: path.join(__dirname, "_build/html"),
watchContentBase: true,
compress: true,
hot: false,
liveReload: true,
publicPath: "/_static/"
},
plugins: [
new WatchPlugin({
files: ["./*.py", "./**/*.rst", "./_themes/**/*.html"]
}),
new ShellPlugin({
onBuildEnd: ["make clean html"],
// dev=false here to force every build to trigger make, the default is
// first build only.
dev: false
})
]
});