Skip to content

About

Minimal reproduction for dropped unplugin transform sourcemaps in Rspack

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

unplugin Rspack transform sourcemap reproduction

This reproduces two source map bugs in the Rspack adapter in unplugin:

  1. It drops the source map returned by a transform hook when the loader receives no input source map.
  2. It does not compose the returned transform map with an input map from an earlier loader.

Reproduce

pnpm install
pnpm repro

pnpm repro builds and checks both cases. It is expected to succeed. With [email protected], both cases fail:

Incorrect source maps:
without-input-map: expected source line 1, received line 2
with-input-map: expected source line 1, received line 2

The unplugin transform prepends one generated line and returns the corresponding source map. The second case also runs a preceding loader that prepends a line and returns its map. The verifier traces the generated statement through the final Rspack map; both should resolve to line 1 of src/index.js.

Related upstream fix: unjs/unplugin#615

About

Minimal reproduction for dropped unplugin transform sourcemaps in Rspack

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages