question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

swc-loader much slower if react refresh plugin is enabled

See original GitHub issue

Hey, 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:closed
  • Created 2 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
marco2216commented, Sep 1, 2022

@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

0reactions
piotrpalekcommented, Aug 31, 2022

@marco2216 no sorry 😦 for now we just didn’t move to swc-loader

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found