-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ssr): preserve fetchModule error details (#18626)
- Loading branch information
Showing
9 changed files
with
103 additions
and
2 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
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
57 changes: 57 additions & 0 deletions
57
packages/vite/src/node/ssr/__tests__/__snapshots__/ssrLoadModule.spec.ts.snap
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,57 @@ | ||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html | ||
|
||
exports[`parse error 1`] = ` | ||
{ | ||
"frame": " | ||
Expected ";" but found "code" | ||
1 | invalid code | ||
| ^ | ||
2 | | ||
", | ||
"id": "<root>/fixtures/errors/syntax-error.ts", | ||
"loc": { | ||
"column": 8, | ||
"file": "<root>/fixtures/errors/syntax-error.ts", | ||
"line": 1, | ||
}, | ||
"message": "Transform failed with 1 error: | ||
<root>/fixtures/errors/syntax-error.ts:1:8: ERROR: Expected ";" but found "code"", | ||
} | ||
`; | ||
exports[`parse error 2`] = ` | ||
{ | ||
"frame": "", | ||
"id": "", | ||
"loc": undefined, | ||
"message": "Expected ';', '}' or <eof>", | ||
} | ||
`; | ||
exports[`parse error 3`] = ` | ||
{ | ||
"frame": " | ||
Expected ";" but found "code" | ||
1 | invalid code | ||
| ^ | ||
2 | | ||
", | ||
"id": "<root>/fixtures/errors/syntax-error.ts", | ||
"loc": { | ||
"column": 8, | ||
"file": "<root>/fixtures/errors/syntax-error.ts", | ||
"line": 1, | ||
}, | ||
"message": "Transform failed with 1 error: | ||
<root>/fixtures/errors/syntax-error.ts:1:8: ERROR: Expected ";" but found "code"", | ||
} | ||
`; | ||
exports[`parse error 4`] = ` | ||
{ | ||
"frame": "", | ||
"id": "", | ||
"loc": undefined, | ||
"message": "Expected ';', '}' or <eof>", | ||
} | ||
`; |
1 change: 1 addition & 0 deletions
1
packages/vite/src/node/ssr/__tests__/fixtures/errors/syntax-error-dep.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 @@ | ||
import './syntax-error.js' |
1 change: 1 addition & 0 deletions
1
packages/vite/src/node/ssr/__tests__/fixtures/errors/syntax-error-dep.ts
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 @@ | ||
import './syntax-error.ts' |
1 change: 1 addition & 0 deletions
1
packages/vite/src/node/ssr/__tests__/fixtures/errors/syntax-error.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 @@ | ||
invalid code |
1 change: 1 addition & 0 deletions
1
packages/vite/src/node/ssr/__tests__/fixtures/errors/syntax-error.ts
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 @@ | ||
invalid code |
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
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