|
this.root.source = { input, start: { column: 1, line: 1, offset: 0 } } |
This normally isn't an issue but when creating new nodes and adopting source it can lead to broken source maps.
My case :
- run PostCSS on a separate file
- rewrite parts of the AST
- new nodes are given the
source property from the Root node
The end result is a broken source map that contains <no source>
Relevant code in the map generator: https://github.com/postcss/postcss/blob/main/lib/map-generator.js#L167-L181
postcss/lib/parser.js
Line 34 in 7d51976
This normally isn't an issue but when creating new nodes and adopting
sourceit can lead to broken source maps.My case :
sourceproperty from theRootnodeThe end result is a broken source map that contains
<no source>Relevant code in the map generator: https://github.com/postcss/postcss/blob/main/lib/map-generator.js#L167-L181