Search code examples
reactjswebpackcss-loader

I use react-create-app and got this error => ./src/index.css (./node_modules/react-scripts/node_modules/css-loader/dist/cjs.js??ref--5-oneOf-4-1


I'm using create-react-app for a project and all was perfectly fine until this morning (the font was never an issue either). I got this error by running npm start =>

./src/index.css (./node_modules/react-scripts/node_modules/css-loader/dist/cjs.js??ref--5-oneOf-4-1!./node_modules/postcss-loader/src??postcss!./src/index.css)
Error: Can't resolve './fonts/Plain-Medium.otf'

I tried to rebuild css-loader and reinstall webpack but without success.

Anyone know where this could come from ? Thanks in advance.


Solution

  • There is bug in css-loader.disable postcss-normalize-url in cssnano (normalizeUrl: false)