-
Notifications
You must be signed in to change notification settings - Fork 4
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
Fix error in case bundle.getMainEntry() returns null #4
base: master
Are you sure you want to change the base?
Conversation
This still appends hashes to split files, correct? The reason this is being hit is because the bundle contains too many files (or is too large) and Parcel is splitting the file to share code and make load times faster. The namer couldn't determine the base file name and would error out here. What does your build directory look like with this fix? |
Hi @JaredSartin
I think so. tbh, I'm not too familiar with frontend development and was using parcel v1 with another renaming plugin just fine. But then was forced to migrate to v2 because of parcel-bundler/parcel#2408
What would be a good test case that I could prepare to help diagnose if all of this works fine for large bundles? Cheers, |
Parcel has a bundle config for when splitting should occur. https://parceljs.org/features/code-splitting/#configuration
You could try some builds with the min size at 50 bytes, have a all-the-things.JS that includes 2-3 files and another file that does the same (overlapping a couple includes). Basically trying to trigger the min includes and min size to force the bundler to split the shared includes.
(Sorry. On mobile, hopefully my description makes sense)
… On Oct 17, 2021, at 04:42, Andreas Poehlmann ***@***.***> wrote:
Hi @JaredSartin
This still appends hashes to split files, correct?
I think so. tbh, I'm not too familiar with frontend development and was using parcel v1 with another renaming plugin just fine. But then was forced to migrate to v2 because of parcel-bundler/parcel#2408
And the migration to v2 was, let's say not so smooth.
So far this made it work, but I'm not sure if it introduces other bugs.
The reason this is being hit is because the bundle contains too many files (or is too large) and Parcel is splitting the file to share code and make load times faster. The namer couldn't determine the base file name and would error out here.
What does your build directory look like with this fix?
What would be a good test case that I could prepare to help diagnose if all of this works fine for large bundles?
Cheers,
Andreas 😃
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
it does :) Thanks for the pointer. I'll try to report back in 2 or 3 days. |
Can confirm this works with split files. Due to the bundler splitting behavior, |
Hi @vseventer
I've tried your parcel plugin and basically ran directly into issue #3
This commit fixes the problem for me.
I'm not familiar enough with parcel to judge if it's the correct fix though.
Cheers,
Andreas 😃