Open edariedl opened 3 years ago
same problem !
Anyone's got a fix?
Also hit this issue today. Spent half a day trying to tweak extract-loader
, half trying to move to Snowpack. Neither was a success.
I'm using it as part of a sass-loader
-> css-loader
-> extract-loader
-> lit-scss-loader
chain, and is the core of my workflow so really want this to work again.
My Webpack internals logic is lacking so I was just kind of flailing, would be happy to try and help fix this though.
Eventually my workaround was to change the @import
to a @use
when loading a node_modules
CSS file. Everything worked fine after that this might not work for everyone.
Issue was originally raised in css loader from someone else https://github.com/webpack-contrib/css-loader/issues/1215. It was closed as a problem in
extract-loader
. I have encountered the same problem today.css loader changed the way css with sourcemaps are handled and they have added this method https://github.com/webpack-contrib/css-loader/blob/master/src/runtime/cssWithMappingToString.js
When we importe css file from some node module for (me it was tippy.js via
@import 'tippy.js/dist/tippy.css';
), following errors is raisedI tried to dig a bit deeper and it looks like
css-loader
gets this array to process fromextract-loader
which causes an error in the method mentioned above.