I'm trying to migrate an ejected create-react-app to Webpack 5 and running into this error:
Failed to compile.
The "path" argument must be of type string. Received undefined
error Command failed with exit code 1.
I think the error is coming from output.path which by default from CRA is undefined in development, I have tried to set it to an empty string - or an absolute path and it would not resolve. I have been able to successfuly get Webpack 5 working on a non-cra app with leaving the path as undefined, so I'm thinking its related to the CRA config. Also I have followed this guide with no success https://webpack.js.org/migrate/5/
Code Sandbox: https://codesandbox.io/s/musing-buck-shu04
Appreciate any help!