Patch Changes
-
ed2b607: Fix CSS source map line offsets for multi-line rules. The map generated by
@wyw-in-js/transformplaced every rule on its own line by index, which is wrong as soon as a rule spans several lines: a multi-line comment kept withkeepComments, a backslash-newline string continuation, orpreprocessor: 'none'. The generated line is now derived from the emitted CSS. In@wyw-in-js/turbopack-loader, wrapping selectors in:global()changes the line count (a split selector list duplicates its body, a multi-line selector collapses to one line), so the loader now remaps the generated lines of that map to the wrapped CSS. In query output mode the map is returned to Turbopack from the loader, which is the only way Turbopack picks up a CSS source map; it does not readsourceMappingURLcomments.@wyw-in-js/turbopack-loadergainssource-mapas a runtime dependency for the rebuild. Sidecar output mode keeps the inlinesourceMappingURLcomment, which Turbopack ignores; only query mode reaches Turbopack. Turbopack itself drops loader source maps in production builds unlessproductionBrowserSourceMapsis enabled, so the map is visible innext devand in builds with that flag. -
Updated dependencies
- @wyw-in-js/transform@2.5.1