Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/kit/src/exports/vite/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1475,6 +1475,7 @@ async function kit({ svelte_config }) {
);
} else {
copy(server_assets, client_assets);
copy(kit.files.assets, `${out}/client`);
}

// ...and prerender
Expand Down
3 changes: 3 additions & 0 deletions packages/kit/test/apps/amp/src/routes/assets/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@
</script>

<img src={image} alt="svelte logo" />

<!-- eslint-disable-next-line svelte/no-navigation-without-resolve -->
<a href="/asset.json">includes public assets</a>
3 changes: 3 additions & 0 deletions packages/kit/test/apps/amp/static/asset.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"bar": "foo"
}
7 changes: 5 additions & 2 deletions packages/kit/test/apps/amp/test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ test('skips client build if every node has CSR disabled', async ({ page, request
const src = await page.locator('img').getAttribute('src');
if (!src) throw new Error('Image src not found on /assets page');

const response = await request.get(src);
expect(response.status()).toBe(200);
const img_response = await request.get(src);
expect(img_response.status()).toBe(200);

const public_asset_response = await request.get('/asset.json');
expect(public_asset_response.status()).toBe(200);

@teemingc teemingc Jun 10, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test checks that the public assets are accessible after build

});
Loading