mirror of
https://github.com/danog/dart-sass.git
synced 2024-12-11 16:49:48 +01:00
0595ac3e71
When a stylesheet is imported, the parsed stylesheet object is cached based on its canonical URL. However, the stylesheet.span.sourceUrl was based on the text of the import that was used to load that stylesheet. The idea was to make the source URL in stack traces look nicer, but it meant that relative URLs could be resolved based on the old importer's URL before being sent to the new importer, which caused bugs. Now stylesheet.span.sourceUrl is always the canonical URL of the stylesheet, and thus safe to cache. We then use the import cache to convert the canonical URL to a human-friendly URL at the point at which we generate stack traces. This also deprecates support for relative canonical URLs. The semantics of these URLs were always unclear, and with the new change in import internals the old behavior doesn't make much sense. It's preserved for backwards-compatibility, but deprecated. |
||
---|---|---|
.. | ||
dart | ||
node | ||
shared | ||
dart_test.dart | ||
node_test.dart | ||
shared.dart |