File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
packages/electron-webpack Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change 11
11
from : " dist/renderer"
12
12
-
13
13
from : " dist/renderer-dll"
14
+ extraResources :
14
15
-
15
16
from : static
16
17
to : static
Original file line number Diff line number Diff line change 1
1
import * as path from "path"
2
- import { BannerPlugin } from "webpack"
2
+ import { BannerPlugin , DefinePlugin } from "webpack"
3
3
import { WebpackConfigurator } from "../main"
4
4
import { getFirstExistingFile } from "../util"
5
5
import { BaseTarget , configureFileLoader } from "./BaseTarget"
@@ -28,6 +28,10 @@ export class MainTarget extends BaseTarget {
28
28
await BaseTarget . prototype . configurePlugins . call ( this , configurator )
29
29
30
30
if ( configurator . isProduction ) {
31
+ configurator . plugins . push ( new DefinePlugin ( {
32
+ __static : `process.resourcesPath + "/static"`
33
+ } ) )
34
+
31
35
// do not add for main dev (to avoid adding to hot update chunks), our main-hmr install it
32
36
configurator . plugins . push ( new BannerPlugin ( {
33
37
banner : 'require("source-map-support/source-map-support.js").install();' ,
You can’t perform that action at this time.
0 commit comments