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

Use babel-loader and esbuild-loader in webpack at the same time #99

Closed
zheyaoa opened this issue Jan 25, 2021 · 4 comments
Closed

Use babel-loader and esbuild-loader in webpack at the same time #99

zheyaoa opened this issue Jan 25, 2021 · 4 comments
Labels

Comments

@zheyaoa
Copy link

zheyaoa commented Jan 25, 2021

I have a good idea is that use babel-loader and esbuild-loader both in webpack.
So I have a test is config my webpack is that
image
i want to use esbuild-loader to transform code from high version code to es5.
The babel-loader only use to do some custom babel-plugin sush as babel-plugin-import and react-refresh/babel
image
But i get an error .
image
I don't know what happened.

@zheyaoa
Copy link
Author

zheyaoa commented Jan 26, 2021

@privatenumber
Copy link
Owner

I haven't looked into the error yet, but you should know that esbuild's main selling point is speed.

Keeping Babel in the chain jeopardizes the speed benefit of using esbuild because Babel is still the bottleneck.

@privatenumber
Copy link
Owner

I looked into it, and turns out the source map returned by esbuild needed to be parsed first.

Thanks for reporting!

@github-actions
Copy link

github-actions bot commented Feb 7, 2021

🎉 This issue has been resolved in version 2.9.1 🎉

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

No branches or pull requests

2 participants