forked from chaiNNer-org/chaiNNer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.main.config.js
31 lines (29 loc) · 925 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
// eslint-disable-next-line import/no-extraneous-dependencies
const CopyPlugin = require('copy-webpack-plugin');
const isDevelopment = process.env.NODE_ENV !== 'production';
/** @type {import("webpack").Configuration} */
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: {
main: './src/main/main.ts',
},
mode: isDevelopment ? 'development' : 'production',
// Put your normal webpack config below here
module: {
// eslint-disable-next-line global-require
rules: require('./webpack.rules'),
},
plugins: [
new CopyPlugin({
patterns: [{ from: 'node_modules/rregex/lib/rregex.wasm' }],
}),
],
resolve: {
extensions: ['.js', '.ts'],
},
externals: ['electron/common', 'electron/main'],
};