Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exclude modules #573

Open
Christilut opened this issue Jan 13, 2021 · 7 comments
Open

Exclude modules #573

Christilut opened this issue Jan 13, 2021 · 7 comments

Comments

@Christilut
Copy link

Is there a way to exclude certain modules? There is onlyModules to do the opposite, but it's not very practical if you need to exclude a module to always have to keep onlyModuels up to date.

Also, is there a way to get electron-rebuild to list all the modules it's building? If I want to add all my current modules in onlyModules except one, I have no idea right now what modules it's actually building.

@malept
Copy link
Member

malept commented Jan 13, 2021

What is the use case for excluding modules? An example would also be helpful.

@Christilut
Copy link
Author

I'm using @journeyapps/sqlcipher but it is incompatible with electron-rebuild (see here). The suggested workaround is to use onlyModules but that means I have to explicitly include modules I do want to use there.

@dko-slapdash
Copy link

@malept Another usecase is to exclude fsevents module on e.g. MacOS. Typically, fsevents is used by dev tools like tsc --watch, cpx, webpack --watch etc., and electron-rebuild rebuilds this module too which causes watch-mode to stop working silently (chokidar internally used in all these tools just silently switches to polling mode which kills CPU).

If we had --exclude in electron-rebuild package, then we'd be able to tell it to not rebuild fsevents and thus keep the dev tools intact.

@dko-slapdash
Copy link

...Notice that packages like chokidar, jest-haste-map etc. have fsevents in package.json's optionalDependencies (which makes sense). That's why I guess electron-rebuild rebuilds it too.

@jeremymurray
Copy link

We're also currently running into this issue specifically for fsevents on windows (where we need it on osx builds). An omit would be nice or some way to ignore and continue if a build fails.

@aguynamedben
Copy link

My use case for wanting this: using node-sqlite3, but with SQLCipher, so I want to run a custom node-gyp for that rebuild only.

@aguynamedben
Copy link

Here's the command we have to use

$ electron-rebuild --only @adeperio/forcefocus,@hypersprite/vscode-windows-registry,@nodert-win10-rs4/windows.foundation,@nodert-win10-rs4/windows.system,@sentry/electron,@slack/web-api,evernote,extract-file-icon,jsforce,keyboard-layout,keytar,node-abi,node-fetch,plist,sequelize
✔ Rebuild Complete
✨  Done in 9.71s.

What would be nice

$ electron-rebuild --exclude sqlite

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants