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.

Exclude a directory while packaging

See original GitHub issue
  • Version: 8.7.0
  • Target: OSX

I’m using electron-builder to package my app. While building installers I want to exclude a directory (which is junk and have no real use) which resides in my app/node_modules/@paulcbetts/cld/deps/cld . As of now I manually delete it and then run npm run dist to package. Is there any way I can exclude it while building?

@develar any help would be highly appreciated since that folder is taking ~120MB of my app size 😭

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

14reactions
akashnimarecommented, Nov 21, 2016

@develar you’re awesome. Thank you so much ❤️ . To make it work correctly I had to use it like this -

"files": [
     "**/*",
      "!node_modules/@paulcbetts/cld/deps/cld${/*}"
    ]
2reactions
develarcommented, Nov 21, 2016

As stated in the docs:

Remember that default pattern / is not added to your custom, so, you have to add it explicitly — e.g. ["*/", "!ignoreMe${/}"].

Read more comments on GitHub >

github_iconTop Results From Across the Web

When creating a pip package, how do I exclude directories ...
I tried to exclude a folder, not just files. It appears there is no option for that in the manifest. The command prune...
Read more >
Excluding Files and Folders from Deployment - Microsoft Learn
This topic describes how you can exclude files and folders from a web deployment package when you build and package a web application ......
Read more >
Unable to Exclude Files Inside src/main/resources Directory ...
You are using Mule 4 and Mule Maven Plugin 3.x. You are trying to exclude certain files from appearing in the packaged JAR...
Read more >
Including and excluding files and directories - Apache Maven
When specifying a resource directory, every file within that directory may not be used. Thus, we may have to specify only the files...
Read more >
How to Exclude Folders in PyCharm - mothergeo
PyCharm allows you to exclude directories from consideration when searching and refactoring. You can exclude a directory by right-clicking on it and ...
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