-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.renderer.dev.dll.js
51 lines (43 loc) · 1.19 KB
/
webpack.config.renderer.dev.dll.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
/* eslint global-require: 0, import/no-dynamic-require: 0 */
// Builds the DLL for development electron renderer process
import {join, resolve} from "path";
import {DllPlugin, EnvironmentPlugin, LoaderOptionsPlugin} from "webpack";
import merge from "webpack-merge";
import baseConfig from "./webpack.config.base";
import {dependencies} from "./package.json";
const dist = resolve(process.cwd(), "dll");
export default merge.smart(baseConfig, {
mode: "development",
target: "electron-renderer",
module: require("./webpack.config.renderer.dev").module,
devtool: "eval",
context: process.cwd(),
externals: ["fsevents", "crypto-browserify"],
entry: {
renderer: Object.keys(dependencies || {})
},
output: {
library: "renderer",
path: dist,
filename: "[name].dev.dll.js",
libraryTarget: "var"
},
plugins: [
new DllPlugin({
path: join(dist, "[name].json"),
name: "[name]"
}),
new EnvironmentPlugin({
NODE_ENV: "development"
}),
new LoaderOptionsPlugin({
debug: true,
options: {
context: resolve(process.cwd(), "app"),
output: {
path: resolve(process.cwd(), "dll")
}
}
})
]
});