Skip to content
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

Let's set up a modern Rollup-based build system #76

Open
revelt opened this issue Oct 16, 2019 · 4 comments
Open

Let's set up a modern Rollup-based build system #76

revelt opened this issue Oct 16, 2019 · 4 comments

Comments

@revelt
Copy link

revelt commented Oct 16, 2019

Related to #64, we should remove all UMD and iife-related code and leave it for Rollup to produce UMD, CJS and EMS builds. Along the way, we could rebase the source to be in ES6+ and keep the source in ES Modules format so that importing parties could benefit from tree-shaking etc. Publishing methods as separate packages (lodash-style) is also an option which would solve #64.

Currently, the iife wrapper in the source contains this and it throws errors in Rollup:

rollup

That's what I'm talking about — if we cleaned the source to be in ES Modules (with import/export) and left up to Rollup to produce the UMD build, we could improve the user experience.

The fork https://www.npmjs.com/package/lean-he already went to the right direction, removing the iife wrapper but it still lacks proper Rollup setup with UMD, CJS and ESM builds.

@mathiasbynens please advise, do you see value in this path or should we forget about setting up the Rollup and close this issue.

@mathiasbynens
Copy link
Owner

I'd love to see a modern Rollup-based build setup! Would you be willing to submit a PR?

@revelt
Copy link
Author

revelt commented Oct 17, 2019

OK, I'll try. @mathiasbynens are you happy to also start using prettier on default settings? Formatting is the first obstacle when collaborating.

@mathiasbynens
Copy link
Owner

I'd prefer separating the two. Let's keep the Rollup patch as small as possible, and then consider prettier as a separate follow-up patch.

@revelt
Copy link
Author

revelt commented Oct 17, 2019

Duly noted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants