forked from chrismaltby/gb-studio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.cli.config.js
43 lines (41 loc) · 1.06 KB
/
webpack.cli.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
43
const plugins = require("./webpack.plugins");
const Path = require("path");
const webpack = require("webpack");
const srcPath = (subdir) => {
return Path.join(__dirname, "src", subdir);
};
module.exports = {
target: "electron-main",
mode: "development",
/**
* This is the main entry point for your application, it's the first file
* that runs in the main process.
*/
node: {
__dirname: false,
__filename: false,
},
entry: Path.resolve(__dirname, "./src/bin/gb-studio-cli.ts"),
output: {
filename: "gb-studio-cli.js",
path: Path.resolve(__dirname, "./out/cli"),
publicPath: __dirname,
},
// Put your normal webpack config below here
module: {
rules: require("./webpack.rules"),
},
plugins: [].concat(
plugins,
new webpack.BannerPlugin({ banner: "#!/usr/bin/env node", raw: true })
),
resolve: {
extensions: [".js", ".ts", ".jsx", ".tsx", ".css"],
alias: {
store: srcPath("store"),
components: srcPath("components"),
lib: srcPath("lib"),
ui: srcPath("components/ui"),
},
},
};