addons-frontend icon indicating copy to clipboard operation
addons-frontend copied to clipboard

Try to find a different way to include unminified React in development

Open bobsilverberg opened this issue 1 year ago • 0 comments

There is some code in webpack.dev.config.babel.js that loads unminified versions of the React libraries when we are running in development. The comment around this code says:

// Load unminified React and Redux in development to get better error
// messages, because they use
// [Invariant](https://github.com/zertosh/invariant) which hides error
// messages in the production build.

It replaces the default libraries with files in the /umd/ folder, (e.g., react/umd/react.development.js), but those files no longer exist in the most recent version of React. We can therefore no longer include those files.

I have done some Googling to try to see if there is another way of accomplishing what we were trying to do here, but have come up empty. In order to have this not block our dependency update, I have commented out this code.

This issue is about looking into this further and trying to determine if we really still need this, and if so, how else we might accomplish this.

bobsilverberg avatar Jul 20 '22 16:07 bobsilverberg