forked from chrismaltby/gb-studio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.main.config.js
42 lines (39 loc) · 999 Bytes
/
webpack.main.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
36
37
38
39
40
41
42
const plugins = require("./webpack.plugins");
const CopyPlugin = require("copy-webpack-plugin");
const Path = require("path");
const mainPlugins = [].concat(
plugins,
new CopyPlugin({
patterns: [
{ from: "node_modules/about-window", to: "node_modules/about-window" },
],
})
);
const srcPath = (subdir) => {
return Path.join(__dirname, "src", subdir);
};
module.exports = {
target: "electron-main",
/**
* This is the main entry point for your application, it's the first file
* that runs in the main process.
*/
entry: "./src/main.ts",
// Put your normal webpack config below here
module: {
rules: require("./webpack.rules"),
},
plugins: mainPlugins,
resolve: {
extensions: [".js", ".ts", ".jsx", ".tsx", ".wasm", ".css"],
alias: {
store: srcPath("store"),
components: srcPath("components"),
lib: srcPath("lib"),
ui: srcPath("components/ui"),
},
},
externals: {
"about-window": "about-window",
},
};