electron-builder ignores directories named `build` in `files:` configuration
See original GitHub issue-
Version: electron-builder@16.2.1
-
Target: Any
create-react-app
by default outputs to a directory named build/
. With a electron-builder.yml
structured like so:
files:
- electron/
- node_modules/
- build/
The build/
directory is excluded. Most likely due to some internal logic.
It’s also unfortunate that setting files:
really means asarFiles
, and setting it manually overwrites the default values (IE you won’t get node_modules/
), and that there’s no equivalent extraAsarFiles
.
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (2 by maintainers)
Top Results From Across the Web
How to exclude file when build electron with electron-builder?
I provide a file like config.json for user to edit some custom config, then the application could read the file to do something....
Read more >Application Contents - electron-builder
Development dependencies are never copied in any case. You don't need to ignore it explicitly. Hidden files are not ignored by default, but...
Read more >Common Configuration - electron-builder
If you want to use js file, do not name it electron-builder.js . It will conflict with electron-builder package name. Tip. If you...
Read more >File Patterns - electron-builder
** If a “globstar” is alone in a path portion, then it matches zero or more directories and subdirectories searching for matches. It...
Read more >Command Line Interface (CLI) - electron-builder
Commands: electron-builder build Build [default] electron-builder install-app-deps ... format) --projectDir, --project The path to project directory.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@mikew God bless your cow, that worked! Thanks for sharing.
So, yes, @develar, as OP mentioned, the directory named “build” does indeed get ignored and has to be explicitly put into “files” option in configuration, like so
This comes as an issue for most of the people doing a
webpack
build before packaging the things to be used withelectron
, and is definitely an issue for anyone who started withcreate-react-app
.I don’t see how @develar’s suggestion helps this issue. setting
directories.output
, say, in package.json like this:changes electron-builder’s output folder from the default
dist/
tocustom-output/
. It doesn’t seem to affect the OP’s issue (and my issue at the moment) at all (thebuild/
folder is still ignored). Might I be missing something?