Closed antonycourtney closed 7 years ago
Root directory build
it is build resources directory by default, please see https://github.com/electron-userland/electron-builder/wiki/Options#MetadataDirectories-buildResources
You need to change buildResources
option.
it still doesn't work I added
"directories": {
"buildResources": "./electron-config", //contains main.js
"output": "dist"
},
and I updated my main: "electron-config/main.js"
also tried main.js
./main.js
I got the same error again
alright finally make it work: add the main.js
into the files
then it can find it now
I use webpack to build my application and have it set to write generated bundles to
./build
in the project directory. I run both the main process entry and the render process through webpack, so my"main"
entry in package.json is:When running electron-builder I continually get an error message indicating that the files in the build directory are not being included in the generated
Resources/app.asar
archive. I've tried adding them explicitly in numerous ways: I've tried:"build.extraFiles"
inpackage.json
to[ "build/*", "build/**/*" ]
"build.extraResources"
inpackage.json
to[ "build/*", "build/**/*" ]
"build.files"
inpackage.json
to[ "build", "node_modules" ]
(I thought perhaps that since "build" is an entry in my.gitignore
, it might be worth explicitly setting the files I wanted to include)Relevant snippet of
package.json
:Error message I see is below. Unfortunately I'm including some native code library dependencies, so it takes more than a minute to build those native libraries before I get the error message below.
Is there any way to debug the file globs to see what's going in to (or excluded from) the generated asar archive, and why? Is there anything magical about the directory named
'build'
that prevents it from being included? Any examples of another project using webpack and electron-builder?Any help greatly appreciated. Thank You!