-
-
Notifications
You must be signed in to change notification settings - Fork 735
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
Rollup #632
Conversation
Codecov Report
@@ Coverage Diff @@
## master #632 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 15 15
Lines 619 619
Branches 134 134
=====================================
Hits 619 619 Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gpbl I don't think bower is useful for cjs modules. unpkg won't bundle cjs, but can deliver umd from npm. Do you mean |
If you want I can commit |
The major version is not much for breaking, just for safety. I won't wait much for the release. Have you looked at the website from localhost if it works fine? |
Not yet |
(not sure if website loads the built version or not, maybe i wrote some docs there?) |
We are quite ready for this, just wait some days to see if user upgrading to v7.1.0 have some unforeseen issues :) Thanks @TrySound for your work! |
Thinking it again, could we keep the Input component outside the DayPicker bundle? not everyone is going to use it. I’m looking for a way to import the two components separately. |
Why so? Input component is not so big since you get rid from moment.js. And eventually it even will be treeshaked. I think it's important to keep package solid with single entry point. |
I think I can make it treeshakable now too. |
It’s not that big. Still...
Is too old school? 😊 Does treeshaking work out of the box even with webpack <3? |
@gpbl webpack < 4 shouldn't matter, since you gonna release major version. If somebody want to upgrade a few react components they probably will be lucky to upgrade tooling also to get better experience on all sides. |
I don’t see how the two things are related.
Who is going to upgrade to webpack 4? 😅 We are still releasing too many major versions, we must be nice with other devs 😊 |
They are related with one command
We introduce breaking change with requirement to use new features which work perfectly, but we do not break code including this component. It will be just a bit bigger. The main problem is that "pathed" imports introduces even more mess over solved issues. Usually projects distribute umd, cjs and esm. UMD can be used for puppeteer tests and via unpkg. cjs is useful for node tests. esm is used by bundlers. If you want to add two entry points you should also duplicate format namespaces. So your package will have lib/index.js
lib/Input.js
esm/index.js
esm/Input.js What do you think users will use first? The wrong one. Unoptimized. Oh, and UMD will have |
So, if someone wants to reduce the bundle size should upgrade their tools to use treeshaking. I can agree with this if you say that splitting does complicate stuff too much 👌🏽 |
I will rebase this today later. |
Ref #516
DayPicker.dist.js
withsrc/index.umd.js
Input
)Input
to cjs entry pointlib/src
. What is it useful for? I'd even ignore whole lib folderobject-assign
package with object spread to use babel helper which is already in the bundleresults
webpack
daypicker.js 103.0K
daypicker.min.js 39.71K
rollup
daypicker.js 59.53K
daypicker.min.js 27.21K