Unable to use ESBuild instead of babel-loader in webpack config #740
Unanswered
sahajarora1286
asked this question in
Q&A
Replies: 1 comment 9 replies
-
|
Hi @sahajarora1286, We could probably get to the bottom of this, but we will release a Re.Pack 5 alpha very soon and in there you will be able to utilize Rspack with SWC which should be even faster than ESBuild. Nonetheless, if you figure this out, please leave a note so others might see it, thanks! |
Beta Was this translation helpful? Give feedback.
9 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I have a React Native Super App that leverages Re.Pack. I have webpack configs for all apps in the project (monorepo).
Currently they're set up to use
babel-loaderfor transpilingjs/ts/jsx/tsxfiles as well as certainnode_modulesto overcome theESM / CJSproblem.The apps have very minimal scaffolding code in them, and yet it takes a long time to compile them (on a fast M1 Macbook Pro).
I read an article by repack where it suggested using
ESBuildto speed up webpack's performance.This is the webpack rules config (partial) I have with ESBuild which doesn't seem to be working:
This webpack config is of a micro-app that gets loaded (via module-federation) lazily at runtime by the
hostapp when the user visits a certain page in thehostapp.The micro-app fails to compile with the following error:
Any help on this will be greatly appreciated, as using
babel-loaderseems to be way too slow for local development.Thanks in advance!
UPDATE:
After changing the rules in webpack to:
I get the following transpilation errors for the node_modules:
Beta Was this translation helpful? Give feedback.
All reactions