How should i exclude all node_modules in electron-packager
12,810
If you install modules as devDependencies
, they will all be pruned automatically before packaging.
If you're using electron-builder
you can define glob patterns as files
in the config. In this case !**/node_modules/*
will exclude all of node_modules
.
If you're using electron-packager
you can use the ignore
option and regular expression to exclude files.
Author by
arun thatham
Updated on June 19, 2022Comments
-
arun thatham almost 2 years
I'm using electron-packager for creating an electron.exe of my app. I need to exclude all node modules . I tried the following
--ignore=node_modules
The above is not working. Any idea how to exclude all folders/ remove node modules in final build.
-
Jorge Leitao over 4 yearsI had to use
!node_modules/**/*
.