forked from thenewboston-blockchain/Account-Manager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.renderer.config.js
34 lines (31 loc) · 966 Bytes
/
webpack.renderer.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
/* eslint-disable @typescript-eslint/no-var-requires */
const path = require('path');
const rules = require('./webpack.rules');
function srcPaths(src) {
return path.join(__dirname, src);
}
module.exports = {
devtool: 'source-map',
mode: 'development',
module: {
rules,
},
output: {
path: path.join(__dirname, 'bundle', 'renderer'),
},
resolve: {
alias: {
'@main': srcPaths('src/main'),
'@models': srcPaths('src/models'),
'@renderer': srcPaths('src/renderer'),
'@shared': srcPaths('src/shared'),
'@thenewboston/ui': srcPaths('node_modules/@thenewboston/ui'),
'@thenewboston/utils': srcPaths('node_modules/@thenewboston/utils'),
react: srcPaths('node_modules/react'),
'react-dom': srcPaths('node_modules/react-dom'),
'react-hot-loader': srcPaths('node_modules/react-hot-loader'),
},
extensions: ['.js', '.ts', '.tsx', '.jsx', '.json'],
},
target: 'electron-renderer',
};