I have a project that is packaged via webpack. Css is generated from sass with sourceMap.
devtool: 'source-map',
...
loader: ExtractTextPlugin.extract(
'css-loader?sourceMap=true&minimize=true!' +
'postcss-loader?sourceMap=true!' +
'sass-loader?sourceMap=true'
),
app.css.map
file successfully generated and sourceMappingURL=app.css.map
placed in app.css
.
I see that Chrome recognized .map file in "source tab" because "webpack://" structure exists.
But debugger does not used this .map for css:
[
After that I convert app.css.map
file to base64 (via online service) and paste it into app.css
sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJz...
and all works fine!
Totally:
- .map is correct (because it works in base64 format)
- Chrome detects
app.css.map
and get it successfully (becausewebpack://
exists insource
tab)
Why it doesnt work with "map in app.css.map
" but same map works when it in base64 format? How to fix it?
---- UPD 1 ----
I've tested in other PC with same chrome and all works fine. I think some chrome settigns make this bug.