Closed JiangWeixian closed 4 months ago
according to https://github.com/sass/sass/issues/3300, it works fine when add sourceMapUrl
in load function return. Not sure it's a bug...
const contents = await new Promise((resolve, reject) => {
// Old version of `enhanced-resolve` supports only path as a string
// TODO simplify in the next major release and pass URL
const canonicalPath = _url.default.fileURLToPath(canonicalUrl);
loaderContext.fs.readFile(canonicalPath, "utf8", (err, content) => {
if (err) {
reject(err);
return;
}
resolve(content);
});
});
return {
contents,
syntax,
+ sourceMapUrl: canonicalUrl,
};
Sorry not related to sass-loader please open an issue in resolve-url-loader
, we always return absolute urls, maybe you have source maps comment in your CSS libraries
If you provide reproducible test repo I can show you there is a bug
Bug report
switch
sass
tosass-embedded
with follow sass-loader optionsmeat problem:
find as similar issue in sass repo: https://github.com/sass/sass/issues/3300
Actual Behavior
compile failed
Expected Behavior
compile successful, should work fine as same as when implementation is
sass
How Do We Reproduce?
Please paste the results of
npx webpack-cli info
here, and mention other relevant information