forked from jupyterlab/jupyterlab-desktop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.preload.js
41 lines (37 loc) · 1.01 KB
/
webpack.preload.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
// Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License.
// This script bundles the imports in preload.ts files
// since import is not allowed during runtime
const path = require('path');
const preloadPrefix = 'build/out/main';
const preloadFiles = [
'aboutdialog/preload.js',
'authdialog/preload.js',
'dialog/preload.js',
'labview/preload.js',
'settingsdialog/preload.js',
'progressview/preload.js',
'pythonenvdialog/preload.js',
'pythonenvselectpopup/preload.js',
'remoteserverselectdialog/preload.js',
'titlebarview/preload.js',
'updatedialog/preload.js',
'welcomeview/preload.js'
];
const entries = {};
for (let preload of preloadFiles) {
preload = `${preloadPrefix}/${preload}`;
entries[preload] = path.resolve(__dirname, `./${preload}`);
}
module.exports = {
target: 'electron-preload',
entry: entries,
mode: 'production',
output: {
path: path.resolve(__dirname),
filename: '[name]'
},
optimization: {
minimize: false
}
};