forked from Andy-K-Sparklight/Alicorn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.debug.js
55 lines (51 loc) · 1.38 KB
/
webpack.config.debug.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/*
* This config generates debug build output.
* Debug outputs are used during development. They builds fast, but are not optimized nor packed.
*/
const [baseMain, baseRenderer, rendererOptimization, genConfig] = require("./webpack.config.base");
const CopyWebpackPlugin = require("copy-webpack-plugin");
const path = require("path");
const HtmlWebpackPlugin = require("html-webpack-plugin");
const devCommon = {
devtool: "inline-cheap-module-source-map",
mode: "development"
};
const main = {
...baseMain,
...devCommon,
entry: {
main: "./src/background/Main.ts"
},
output: {
filename: "[name].js",
pathinfo: false,
path: path.resolve(__dirname, "build/debug")
},
plugins: [
new CopyWebpackPlugin({
patterns: [
...genConfig(path.resolve(__dirname, "build/debug"))
]
})
]
};
const renderer = {
...baseRenderer,
...devCommon,
...rendererOptimization,
entry: {
renderer: "./src/renderer/Main.ts"
},
output: {
filename: "[name].js",
pathinfo: false,
path: path.resolve(__dirname, "build/debug")
},
plugins: [
new HtmlWebpackPlugin({
template: path.resolve(__dirname, "resources/build/template.html"),
filename: "renderer.html"
})
]
};
module.exports = [main, renderer];