Commit f8ff2b6
authored
chore: source maps for preprocessors + tests (#10459)
Add source map merging for preprocessors and get tests passing.
- fixed some issues around the `sources` array where they weren't calculated relative to the input correctly
- adjusted some CSS tests because due to our own CSS parser the AST is less granular, so there are less mappings now. Don't think this is a problem, but worth thinking about
- removed enableSourcemap but only log a warning, the reason this was introduced was to mitigate a bug in Vite which occured when having the source map inlined into the SSR'd output. Since SSR doesn't contain inlined CSS anymore (and if it did, we would omit the source map) the reason for which it was introduced no longer exists
- files without js mapping in it have no source mappings yet (originally added in Svelte 4 for #6092)1 parent 4b274dd commit f8ff2b6
File tree
102 files changed
+926
-1358
lines changed- .changeset
- packages/svelte
- src/compiler
- css
- phases
- 1-parse
- read
- utils
- 2-analyze
- 3-transform
- client
- visitors
- server
- preprocess
- types
- utils
- tests
- css
- hydration
- parser-legacy/samples
- animation
- await-catch
- await-then-catch
- each-block-else
- each-block-indexed
- each-block-keyed
- each-block
- no-error-if-before-closing
- unusual-identifier
- parser-modern/samples/snippets
- runtime-browser
- runtime-legacy
- server-side-rendering
- snapshot
- sourcemaps
- samples
- attached-sourcemap
- basic
- binding-shorthand
- binding
- compile-option-dev
- css-injected-map
- css
- decoded-sourcemap
- each-block
- external
- markup
- no-sourcemap
- only-css-sourcemap
- only-js-sourcemap
- preprocessed-markup
- preprocessed-multiple
- preprocessed-no-map
- preprocessed-script
- preprocessed-styles
- script-after-comment
- script
- source-map-generator
- sourcemap-basename-without-outputname
- sourcemap-basename
- sourcemap-concat
- sourcemap-names
- sourcemap-offsets
- sourcemap-sources
- static-no-script
- two-scripts
- typescript
- types
- sites/svelte-5-preview/src/routes/docs/content/03-appendix
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
102 files changed
+926
-1358
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
7 | 5 | | |
| 6 | + | |
8 | 7 | | |
9 | 8 | | |
10 | 9 | | |
| |||
337 | 336 | | |
338 | 337 | | |
339 | 338 | | |
340 | | - | |
| 339 | + | |
341 | 340 | | |
342 | 341 | | |
343 | 342 | | |
| |||
471 | 470 | | |
472 | 471 | | |
473 | 472 | | |
474 | | - | |
475 | 473 | | |
476 | | - | |
| 474 | + | |
477 | 475 | | |
478 | | - | |
| 476 | + | |
479 | 477 | | |
480 | 478 | | |
481 | 479 | | |
482 | 480 | | |
483 | 481 | | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
484 | 485 | | |
485 | | - | |
| 486 | + | |
486 | 487 | | |
487 | 488 | | |
| 489 | + | |
488 | 490 | | |
489 | 491 | | |
490 | 492 | | |
| |||
495 | 497 | | |
496 | 498 | | |
497 | 499 | | |
498 | | - | |
| 500 | + | |
499 | 501 | | |
500 | 502 | | |
501 | 503 | | |
502 | 504 | | |
503 | | - | |
| 505 | + | |
504 | 506 | | |
505 | 507 | | |
| 508 | + | |
506 | 509 | | |
| 510 | + | |
507 | 511 | | |
508 | | - | |
| 512 | + | |
509 | 513 | | |
510 | 514 | | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
511 | 521 | | |
512 | 522 | | |
513 | 523 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
| 45 | + | |
| 46 | + | |
44 | 47 | | |
45 | 48 | | |
46 | 49 | | |
47 | 50 | | |
48 | 51 | | |
49 | 52 | | |
50 | 53 | | |
| 54 | + | |
51 | 55 | | |
52 | 56 | | |
53 | 57 | | |
| |||
133 | 137 | | |
134 | 138 | | |
135 | 139 | | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
136 | 152 | | |
137 | 153 | | |
138 | 154 | | |
| |||
297 | 313 | | |
298 | 314 | | |
299 | 315 | | |
300 | | - | |
301 | 316 | | |
302 | 317 | | |
303 | 318 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| |||
0 commit comments