forked from Chia-Network/chia-blockchain-gui
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.electron.babel.ts
More file actions
41 lines (40 loc) · 890 Bytes
/
Copy pathwebpack.electron.babel.ts
File metadata and controls
41 lines (40 loc) · 890 Bytes
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
import path from 'path';
import CopyPlugin from 'copy-webpack-plugin';
export default {
resolve: {
extensions: ['.tsx', '.ts', '.js'],
},
devtool: 'source-map',
entry: './src/electron/main.tsx',
target: 'electron-main',
stats: 'errors-only',
module: {
rules: [{
test: /\.(js|ts|tsx)$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader',
},
}, {
test: /\.svg$/,
use: ['@svgr/webpack', 'url-loader'],
}, {
test: /\.(gif|png|jpe?g)$/i,
use: [{
loader: 'file-loader',
}],
}],
},
output: {
path: path.resolve(__dirname, './build/electron'),
filename: '[name].js',
},
plugins: [
new CopyPlugin({
patterns: [{
from: path.resolve(__dirname, './src/electron/preload.js'),
to: path.resolve(__dirname, './build/electron'),
}],
}),
],
};