-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
webpack.config.cjs
41 lines (41 loc) · 1.07 KB
/
webpack.config.cjs
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
// webpack.config.js
module.exports = [
{
mode: 'development',
entry: './src/ts/chargyApp.ts',
target: 'electron-renderer',
devtool: "eval-source-map", // Do not use in production!
//devtool: "source-map", // Secure, but very slow: Use in production!
resolve: {
extensions: ["", ".ts", ".js"]
},
module: {
rules: [
{
test: /\.ts$/,
//include: /src/,
use: [{ loader: 'ts-loader' }]
},
{
test: /\.css$/,
use: ['style-loader', 'css-loader']
},
{
test: /\.(woff|woff2|eot|ttf|otf|svg)$/,
type: 'asset/resource',
generator: {
filename: 'assets/fonts/[name][ext][query]' // Path and naming of your fonts
}
}
]
},
externals: {
'asn1': 'asn1.js',
'base32decode': 'base32-decode'
},
output: {
path: __dirname + '/src/build',
filename: 'chargyApp-bundle.js'
}
}
];