-
Notifications
You must be signed in to change notification settings - Fork 36
/
Copy pathwebpack.main.config.js
33 lines (32 loc) · 951 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
const path = require('path');
const ROOT = path.resolve(__dirname);
const SRC = path.join(ROOT, 'src');
const NODE_MODULES = path.join(ROOT, 'node_modules');
const CopyPlugin = require('copy-webpack-plugin');
module.exports = {
/**
* 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: [
new CopyPlugin({
patterns: [
{context: 'src/our-active-win', from: '*.dll*', to: 'native_modules'},
{context: 'src/our-active-win', from: '*.pdb*', to: 'native_modules'},
{context: 'src/our-active-win', from: '*.exe.config', to: 'native_modules'},
],
}),
],
resolve: {
alias: {
root: SRC,
},
extensions: ['.js', '.ts', '.jsx', '.tsx', '.css', '.json'],
modules: [NODE_MODULES],
},
};