forked from FlashpointProject/launcher
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
36 lines (35 loc) · 1.03 KB
/
webpack.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
const path = require('path');
const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin');
module.exports = {
entry: './src/renderer/index.tsx',
output: {
filename: 'main.bundle.js',
path: path.resolve(__dirname, './build/window')
},
// Allows importing build-in node modules in electron render.
// https://stackoverflow.com/questions/39417628/how-to-reference-node-fs-api-with-electron-in-typescript
target: 'electron-renderer',
resolve: {
extensions: ['.js', '.json', '.ts', '.tsx'],
plugins: [new TsconfigPathsPlugin({ configFile: './tsconfig.json' })]
},
module: {
rules: [
{
test: /\.(ts|tsx)$/,
use: {
loader: 'ts-loader',
options: {
configFile: 'tsconfig.renderer.json'
}
}
}
]
},
devtool: 'eval-source-map', // TODO: Put in Development config
externals: {
fsevents: 'require(\'fsevents\')',
'react-native-sqlite-storage': 'react-native-sqlite-storage'
// archiver: 'require(\'archiver\')'
}
};