question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:closed
  • Created 4 years ago
  • Comments:18 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
taylorthurlowcommented, Dec 17, 2020

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.

3reactions
CosmoMyzrailGorynychcommented, Oct 13, 2020

Stalebot is trash. Bugs that don’t get maintainers’ attention are still bugs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Override default Spring-Boot application.properties settings in ...
I noticed that the precedence of @TestPropertySource(locations) was not applied as it would be with .properties files. The problem I was having was,...
Read more >
Application Registration - Win32 apps - Microsoft Learn
In addition to the (Default), Path, and DropTarget entries recognized by the Shell, an application can also add custom values to its executable ......
Read more >
Listener rules for your Application Load Balancer
The default rule always has the last priority. To leave this screen, choose the Back to the load balancer icon (the back button)...
Read more >
2. Spring Cloud Config Server
If there are profile-specific YAML (or properties) files, these are also applied with higher precedence than the defaults. Higher precedence translates to a ......
Read more >
App resources overview - Android Developers
Because each resource is defined with its own XML element, you can name the file whatever you want and place different resource types...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found