Skip to content

Commit 7cdb7a6

Browse files
braeboRich-Harris
andauthored
fix: add optional chaining back to finalise hook (#8846)
* fix: add optional chaining back to `finalise` hook * add a test * remove check task * Update .changeset/grumpy-islands-collect.md --------- Co-authored-by: Rich Harris <hello@rich-harris.dev>
1 parent 089c405 commit 7cdb7a6

14 files changed

Lines changed: 120 additions & 1 deletion

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@sveltejs/kit': patch
3+
---
4+
5+
fix: preserve build error messages

packages/kit/src/exports/vite/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -725,7 +725,7 @@ function kit({ svelte_config }) {
725725
sequential: true,
726726
async handler() {
727727
if (!vite_config.build.ssr) return;
728-
await finalise();
728+
await finalise?.();
729729
}
730730
}
731731
};
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.DS_Store
2+
node_modules
3+
/build
4+
/.svelte-kit
5+
/package
6+
.env.*
7+
!.env.example
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
engine-strict=true
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"name": "syntax-error",
3+
"version": "0.0.1",
4+
"private": true,
5+
"scripts": {
6+
"dev": "vite dev",
7+
"build": "vite build",
8+
"preview": "vite preview"
9+
},
10+
"devDependencies": {
11+
"@sveltejs/kit": "workspace:^",
12+
"svelte": "^3.55.1",
13+
"svelte-check": "^3.0.2",
14+
"typescript": "^4.9.4",
15+
"vite": "^4.0.4"
16+
},
17+
"type": "module"
18+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8" />
5+
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
6+
<meta name="viewport" content="width=device-width" />
7+
%sveltekit.head%
8+
</head>
9+
<body>
10+
<div>%sveltekit.body%</div>
11+
</body>
12+
</html>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export const should_explode = 'boom';
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<div
1.53 KB
Loading
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/** @type {import('@sveltejs/kit').Config} */
2+
const config = {};
3+
4+
export default config;

0 commit comments

Comments
 (0)