forked from BloomBooks/bloom-player
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathwebpack.config.js
35 lines (33 loc) · 1.04 KB
/
webpack.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
34
35
const merge = require("webpack-merge");
const common = require("./webpack.common.js");
const CopyPlugin = require("copy-webpack-plugin");
module.exports = merge(common, {
mode: "development",
devtool: "source-map",
devServer: {
static: { directory: "./dist" },
client: {
overlay: { errors: true, warnings: false }
},
devMiddleware: {
index: "../index.html",
writeToDisk: true
}
},
plugins: [
// Note: CopyPlugin says to use forward slashes. // Note: the empty "to" options mean to just go to the output folder, which is "dist/"
new CopyPlugin([
{
from: "index-for-developing.html",
to: "index.html",
flatten: true
},
// the normal bloomplayer.html looks for the minified bloomplayer, this one doesn't
{
from: "src/bloomplayer-for-developing.htm",
to: "",
flatten: true
}
])
]
});