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.

Crash after migrating webpack 4 -> 5 with new JSX transforms

See original GitHub issue

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.

crash

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:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:6

github_iconTop GitHub Comments

2reactions
vzaidmancommented, Jan 19, 2021

related to #85. i hope it’s possible to solve in the first place. ill look at it asap

0reactions
vzaidmancommented, Jan 29, 2021

Great! I’m closing it for now. I hope I’ll find a way to rewrite esmodule imports later.

Read more comments on GitHub >

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

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