Custom Application Contents > `files` paths should have priority over the default ones
See original GitHub issue-
Version: 21.2.0
-
Targets (not relevant): A lot (Windows, Linux, Mac: zip, NSIS, win-portable, AppImage)
So, in the docs: https://www.electron.build/configuration/contents#files We have a bunch of default paths, and they are always added, no matter what you write in your “files” section or do not write at all.
This is working as expected (from what I understand from the docs, “All default ignores are added in any case”), but the issue is that in my use case, I do need to bundle two .d.ts
files from node_modules
. My first assumption was that the custom files
parameter rewrites the whole array of globs; then, I tried leaving only those relevant to my apps. In any way, my rules to include these two .d.ts
were ignored or actually overridden with the array of the default ones.
Paths that don’t intersect with default ones do work, so it is not a problem with the configuration in package.json
.
In my view, custom files
paths should have priority over the default ones.
About my particular use case: in my game editor, I have a pixi.js graphics engine in its node_modules
. The version of it in my package.json
determines the version my users will have in their projects. As I need to load typedefs and minified versions of pixi.js, I would like to take them from one place, but .d.ts
are not packed into .asar
archive, forcing me to write extraneous tasks in pipelines and change my app’s logic.
Issue Analytics
- State:
- Created 4 years ago
- Comments:18 (2 by maintainers)
Top GitHub Comments
This seems tangentially related but somehow everything in my
.gitignore
is being ignored by default when packaging the app. Removing my/dist
directory from the gitignore causes it to be included in the package again, can’t find a way to prevent that from happening.@CosmoMyzrailGorynych I have been driven to near insanity with stale bots multiple times. They are infuriating, at best.
Stalebot is trash. Bugs that don’t get maintainers’ attention are still bugs.