Created by: n3tr
In https://github.com/facebook/create-react-app/pull/8950,
There is a breaking change in file-loader and url-loader (esModule enable by default). This causes require(..) returns an object instead of a string, and it will break projects that upgrade from v3 to v4.
This PR will disable esModule for those loaders to preserve the require behavior as in v3
Verify step
Both statements below should work.
const image = require('./lmage.png');
import image from './image.png';
I don't know if it is an intention to enable esModule in the loader or not. If so, we probably need to add it as a breaking break of v4 as well.