-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Bundle node modules on --target=node/electron #796
Bundle node modules on --target=node/electron #796
Conversation
Codecov Report
@@ Coverage Diff @@
## master #796 +/- ##
==========================================
- Coverage 95.52% 91.21% -4.31%
==========================================
Files 65 66 +1
Lines 2188 2926 +738
==========================================
+ Hits 2090 2669 +579
- Misses 98 257 +159
Continue to review full report at Codecov.
|
I've rewritten the resolver in #850. It should be easier to disable builtins with that. |
I'll rebase this once #850 is merged. Much better with the new resolver. |
Merged the resolver. |
Hi all. Would it be possible to get this rebased and merged? |
I don't have the time to move this forward myself right now. I'll probably only be able to rebase this PR in a month or two. |
Updated this in #1690. Closing. |
@lbguilherme where it is implemented ? From a long time ago i try and looking for solution but this option is unavailable. I am getting
Any ideas ? |
This adds the option
--bundle-node-modules
to force bundling all files even on--target=node
. This does not work with all modules , but should work for most simpler cases. It will break apart if a module try to do filesystem operations or depend on some internal files. Things such aspuppeteer
orlsmod
will certainly fail.This is ready to merge (please review!).
In a followup pull request I'll bring support for native node modules. Then we can start checking what packages don't build and what can be done for them.
This still isn't capable of bundling Parcel itself, but eventually it should be.
The major change is a rewrite of the Resolver, that now have to conditionally handle
pkg.browser
(the old resolver had no way to disable that). The other files touched are minimal.