yocontra / react-responsive

CSS media queries in react - for responsive design, and more.
https://contra.io/react-responsive
MIT License
7.04k stars 298 forks source link

Error when compiling with Webpack 5 #284

Closed zdila closed 3 years ago

zdila commented 3 years ago

Hello,

I am getting this error when compiling my webapp:

Failed to parse source map: 'webpack:///dist/react-responsive.js' URL is not supported

Webpack config can be found here: https://github.com/FreemapSlovakia/freemap-v3-react/blob/6fe487cd8de87ec47a089f7d813c18c66153eae8/webpack.config.js

yocontra commented 3 years ago

@zdila Can you try with the latest 9.x beta?

zdila commented 3 years ago

I tested with 9.0.0-beta.4 (installed by npm i react-responsive). What version should I specify on npm i?

yocontra commented 3 years ago

@zdila I'm also using webpack 5 with react-responsive in a few projects and haven't had any issues with it loading the sourcemap - the sourcemap comment and files in the repo look fine. I think something is up with the way your sourcemap loading is happening in your webpack config - as far as I know you shouldn't need to manually use source-map-loader.

zdila commented 3 years ago

I don't recall why I added this, but removing it helped :-). Thank you for pointing out!

ViktorSoroka07 commented 2 years ago

@yocontra, when will the beta become stable?

yocontra commented 2 years ago

@ViktorSoroka07 Soon - just been slow playing it because it hasn't received enough installs for me to feel comfortable that it has been tested by enough people.

I just deprecated all of the old 9.x betas and prompted users to upgrade to the most recent one, so once that happens the beta should have as many users as the 8.x branch and I'll push it to be the main version a few days after that.