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

build: use bunchee for bundling #802

Merged
merged 14 commits into from Sep 2, 2022
Merged

build: use bunchee for bundling #802

merged 14 commits into from Sep 2, 2022

Conversation

huozhi
Copy link
Member

@huozhi huozhi commented Jul 17, 2022

bunchee is a zero configuration bundler based on rollup and swc, it can get rid of the webpack runtime code which relying on nodejs runtime variable like __dirname ncc brought in

Also faster ⚡️

✨ Built styled-jsx
✅ Finished in 900 ms
$ bunchee src/webpack.js -f cjs --runtime node -o dist/webpack/index.js
✨ Built styled-jsx
✅ Finished in 226 ms
$ bunchee src/index.js -f cjs --runtime node -e react -o dist/index/index.js
✨ Built styled-jsx
✅ Finished in 63 ms
✨  Done in 2.52s.

x-ref: #784
x-ref: vercel/next.js#40165

@huozhi huozhi changed the title Use bunchee for bundling build: use bunchee for bundling Jul 17, 2022
@huozhi huozhi marked this pull request as ready for review September 1, 2022 23:30
@huozhi huozhi requested a review from ijjk as a code owner September 1, 2022 23:30
src/babel.js Outdated Show resolved Hide resolved
@huozhi huozhi merged commit 66bd5f0 into main Sep 2, 2022
@huozhi huozhi deleted the switch-bundler branch September 2, 2022 00:21
@github-actions
Copy link

github-actions bot commented Sep 2, 2022

🎉 This PR is included in version 5.0.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

Using ncc to build dist/index causes __dirname to end up in "browser bundle"
2 participants