Stylus + Webpack: Source Map Integrity Through Autoprefixer for Deeply Nested Rules
0 reputation · 29 Mar 2023, 18:40 UTC
Integration Boundary: Stylus → Webpack → Autoprefixer
Goal: compile a Stylus file that contains deeply nested selectors, generate a source map, pipe the CSS through autoprefixer, and verify that the final source map still points back to the original Stylus source.
Constraints: Using Stylus 0.63 with --source-map, the stylus-loader plugin in a Webpack 5 pipeline, and autoprefixer 10.x. The unresolved behavior is whether nested rule depth limits in Stylus (e.g., >10 levels) cause source map entries to be omitted after autoprefixer processes the CSS.
Questions:
- Does autoprefixer preserve source map entries for CSS rules that originate from deeply nested Stylus constructs?
- If mappings are lost, is there a configuration knob in
stylus-loaderor autoprefixer to increase depth or force full mapping? - How does the interplay between
stylus-loader’ssourceMapoption and autoprefixer’s own source map handling affect the final mapping accuracy?