Crash after migrating webpack 4 -> 5 with new JSX transforms
See original GitHub issueHello. I’m in the process of migrating from webpack@4
to webpack@5
. After doing so, I started getting an uncaught TypeError from why-did-you-render
.
I believe this is also connected with the latest React JSX transform (I’m using react@16.14
). At the top of the file I have:
import * as React from 'react';
if (process.env.NODE_ENV === 'development') {
const whyDidYouRender = require('@welldone-software/why-did-you-render');
whyDidYouRender(React);
}
If I revert back to webpack@4
and keep the latest JSX transform - it works.
If I keep webpack@5
and revert back to the old React imports - it works.
If I use both together - I get the crash above.
Thanks!
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:6
Top Results From Across the Web
Crash after migrating webpack 4 -> 5 with new JSX transforms
Hello. I'm in the process of migrating from webpack@4 to webpack@5 . After doing so, I started getting an uncaught TypeError from why-did-you-render...
Read more >ReferenceError: React is not defined - Migrating from CRA to ...
The issue stemmed from CRA using the new jsx runtime to auto-import React into jsx files. Vite doesn't use the new jsx runtime...
Read more >Why Would Webpack Stop Re-compiling? (The Quest for ...
We were experiencing an issue where Webpack would mysteriously stop re-compiling and provide no error messaging. We narrowed it down to a memory ......
Read more >Creating a React app with Webpack - JavaScript Ramblings
Simple step by step walkthrough of setting up a React app with Webpack.
Read more >Introducing the New JSX Transform – React Blog
If you get this Gatsby error after upgrading to React 17 RC, run npm update to fix it. Manual Babel Setup. Support for...
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
related to #85. i hope it’s possible to solve in the first place. ill look at it asap
Great! I’m closing it for now. I hope I’ll find a way to rewrite esmodule imports later.