-
Notifications
You must be signed in to change notification settings - Fork 27.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
next-custom-transforms
tests to verify source maps
This allows us to quickly verify that the spans that are defined in the SWC transforms yield correct source maps. The `output.js` and `output.js.map` files can be used to visualize the source mapping, e.g. at https://evanw.github.io/source-map-visualization/. For now I'm adding a single fixture for `'use cache'` with this PR.
- Loading branch information
1 parent
c6d3690
commit a1d9668
Showing
4 changed files
with
57 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
crates/next-custom-transforms/tests/fixture/source-maps/use-cache/1/input.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
'use cache' | ||
|
||
const foo = async () => { | ||
'use cache' | ||
} | ||
|
||
export async function bar() { | ||
return foo() | ||
} |
17 changes: 17 additions & 0 deletions
17
crates/next-custom-transforms/tests/fixture/source-maps/use-cache/1/output.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
crates/next-custom-transforms/tests/fixture/source-maps/use-cache/1/output.map
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.