-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathforge.config.js
42 lines (40 loc) · 1.15 KB
/
forge.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
37
38
39
40
41
42
const fs = require('fs');
const sumatra = fs.readdirSync('node_modules/pdf-to-printer/dist/').find(e => e.endsWith('.exe'));
module.exports = {
packagerConfig: {
extraResource: [
`node_modules/pdf-to-printer/dist/${sumatra}`,
`node_modules/regedit/vbs`
]
},
rebuildConfig: {},
makers: [{
name: '@electron-forge/maker-squirrel',
config: {
name: 'label-terminal-win32-ia32'
}
}],
plugins: [
{
name: '@electron-forge/plugin-webpack',
config: {
mainConfig: './webpack.main.config.js',
devContentSecurityPolicy: `default-src * data: blob: filesystem: about: ws: wss: 'unsafe-inline' 'unsafe-eval'`,
// I gave up `default-src 'self' https://wiki.temporaerhaus.de https://cdn.jsdelivr.net/ 'unsafe-eval' 'unsafe-inline'`,
renderer: {
config: './webpack.renderer.config.js',
entryPoints: [
{
html: './src/index.html',
js: './src/renderer.js',
name: 'main_window',
preload: {
js: './src/preload.js',
},
},
],
},
},
},
],
};