Skip to content

v0.1.4 — Source map fix

Choose a tag to compare

@Zixtar Zixtar released this 18 May 07:18
· 4 commits to master since this release

What's changed

Fixed

  • Source maps broken in browser devtools — breakpoints always snapped to line 1 of the .svelte file and could not be placed on specific lines. The preprocessor now returns a magic-string source map with source: filename set, so Vite's internal getCombinedSourcemap() keeps the correct source reference instead of replacing it with the original unprocessed file content.

Added

  • Source map regression tests (tests/sourcemap.test.ts) — 8 unit tests run via npm test, covering: map presence, correct sources[0] filename, per-line mappings for original code, and absence of mappings on injected lines.
  • npm test script — vitest is now a dev dependency; the plugin repo has its own test suite.
  • CHANGELOG.md

Changed

  • magic-string added as an explicit runtime dependency (was already pulled in transitively).
  • @vitejs/devtools-kit dev dependency upgraded 0.1.210.1.24.