-
Notifications
You must be signed in to change notification settings - Fork 26
Switch bundling to rollup.js #23
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
base: master
Are you sure you want to change the base?
Conversation
|
@realityking this looks cool. Do you know if it reduces the bundle size at all? |
|
Also @zenorocha do you know when this might be merged? |
|
@mrmartineau I haven't measured it but when bundling with webpack it should be a bit smaller because it's just one CJS module, not two. I'll actually remove the ESM version from the package.json. Compatability is still a bit funky, I now actually think it shouldn't be published right now. (<-- this is done) |
|
@zenorocha Could you have a look at this one? Thanks. |
|
@zenorocha I just updated this PR with the newest rollup version. Any chance you could review it? 🙏 |
|
I like this but instead of having two files it can just output the umd version. It's already universal. Webpack's bundle is always bigger, especially when not minified |
You mean drop the CJS version? The CJS version is smaller and should haver a (slightly) lower startup time (due to less function invocations. Obviously a drop in the bucket for any given modules, but we have dozens of dependencies. I think it's best to give consumers the most efficient code possible - especially when it's as seamless as with npm packages. |
|
Hi @zenorocha, I updated this PR to be free of merge conflicts and deprecation warnings. I also updated all the newly added dependencies to their newest version. It'd be great if you could review this. It'd be a nice little bundle size saver. Note this PR includes the commit from #37. |
|
It’s been 3 years without PRs merged. If you want to save space and avoid bugs, use the forked version: https://github.com/fregante/delegate-it |
This is a breaking change as the path to the dist file changed and
closest.jsis no longer externally accessible.