Commit d7ebbbac authored by Stefan Galinski's avatar Stefan Galinski 🎮
Browse files

[BUGFIX] Fix sourcemap generation errors in css files

parent 30d05705
......@@ -176,19 +176,14 @@ module.exports = class Css extends Task {
try {
postProcessedCss = await postcss(postCssPlugins).process(cssString, {
from: _input,
to: _output,
map: this._config.cssPipeline.sourceMaps ? {
inline: false,
annotation: path.join(path.relative(path.dirname(_output), path.dirname(sourceMapPath)), path.basename(sourceMapPath)),
sourcesContent: true
} : false
to: _output
});
} catch (_error) {
this._handleError(`${_error.message}`);
}
await this._writeFile(_output, postProcessedCss.css);
if (this._config.cssPipeline.sourceMaps) {
if (this._config.cssPipeline.sourceMaps && postProcessedCss.map) {
await this._writeFile(sourceMapPath, postProcessedCss.map);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment