-
-
Notifications
You must be signed in to change notification settings - Fork 92
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
Shouldn't @mapbox/node-pre-gyp be under devDependencies? #364
Comments
Not really, because it is used when installing the package, to select and download prebuilt binaries when available (see the |
Couldn't that still be a |
It runs every time the package is installed or updated. You are right that it will not be needed after installation, but An alternative solution would be creating a package for each architecture supported, and use a trick with |
I think I follow that, but maybe I don't, because my concern isn't that it sticks around in our My concern is that it ends up bundled into our application and distributed to our application's end users, who should never need Wouldn't it still be available for the |
It does not, Here's a detailed explanation of each dependency type. |
Ah yes, that makes sense. Thanks very much for the explanation! |
Version 30 and up seem to require Unpacked it's around 400kb. I'd love to avoid including it if possible. I'm not sure why it might be needed since node-gyp won't run in production. |
It will be required as long as Considering how large it is, it might be worth it to simply bundle all prebuilt binaries into the package, as they account for just under 300 KB which is less than the dependency needed to pick and download the correct one... |
Thanks as always for your reply!
That make sense as far as why it needs to be listed as a dependency - but manually excluding it from our bundle used to be fine and now it crashes
That makes a lot of sense. My only concern would be that perhaps the dependencies are more compressible than the binaries. |
Ah! I understand. Can you provide a minimal reproducible example that I can investigate? |
Template questions N/A.
We're using version
0.29.1
and I noticed @mapbox/node-pre-gyp is bundled with our app - but as I understand it, that will never be necessary for end users. Is it included where it is to facilitate some part of the build process?Specifically I noticed that
electron-builder
includes it in the bundled application since it's marked as a dependency.Thanks again @ranisalt for all the amazing work!
The text was updated successfully, but these errors were encountered: