swc-loader much slower if react refresh plugin is enabled
See original GitHub issueHey, I’ve tried integrating react fast refresh with swc-loader
, and the result is that if I add new ReactRefreshPlugin()
to the plugins: []
list in webpack, swc-loader
is dog slow (well, as slow as if I was using babel). If I remove this plugin it’s way faster, any ideas what could be wrong? Is this expected?
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Webpack5 + react-refresh-webpack-plugin does not work
I have been trying to setup fast refreshing and hot reloading in react with `webpack5 following the documentation for react-refresh-webpack- ...
Read more >Advanced Features: Next.js Compiler
We're working to port babel-plugin-styled-components to the Next.js Compiler. First, update to the latest version of Next.js: npm install next@latest .
Read more >Esbuild – An extremely fast JavaScript bundler - Hacker News
I have two 50K+ LOC projects using esbuild, and I would use it even if it was slower than webpack/babel/tsc simply not to...
Read more >@pmmmwh/react-refresh-webpack-plugin - npm
An **EXPERIMENTAL** Webpack plugin to enable "Fast Refresh" (also ... (from the React team) is a required peer dependency of this plugin.
Read more >babel-loader - webpack
webpack is a module bundler. Its main purpose is to bundle JavaScript files for usage in a browser, yet it is also capable...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@piotrpalek Feel free to try out if this change helps, I’m not actually sure if it has anything to do with swc-loader, but it significantly improved our transpile speed https://github.com/pmmmwh/react-refresh-webpack-plugin/pull/669
@marco2216 no sorry 😦 for now we just didn’t move to
swc-loader