Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix manifest not updating on route creation #5157

Merged
merged 13 commits into from
Jun 22, 2022
5 changes: 5 additions & 0 deletions .changeset/young-pens-exist.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/kit': patch
---

fix manifest not updating when adding routes
5 changes: 4 additions & 1 deletion packages/kit/src/core/dev/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,10 @@ export const sveltekit = function (svelte_config) {
port: 3000,
strictPort: true,
watch: {
ignored: [`${kit_config.outDir}/**`, `!${kit_config.outDir}/generated/**`]
ignored: [
// Ignore all siblings of config.kit.outDir/generated
`${posixify(kit_config.outDir)}/!(generated)`
]
}
}
},
Expand Down
6 changes: 3 additions & 3 deletions packages/kit/test/apps/basics/test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2370,16 +2370,16 @@ test.describe.parallel('Routing', () => {
server.close();
});

test('watch new route in dev', async ({ page, javaScriptEnabled }) => {
test('watch new route in dev', async ({ page }) => {
await page.goto('/routing');

if (!process.env.DEV || javaScriptEnabled) {
if (!process.env.DEV) {
return;
}

// hash the filename so that it won't conflict with
// future test file that has the same name
const route = 'bar' + new Date().valueOf();
const route = 'zzzz' + Date.now();
const content = 'Hello new route';
const __dirname = path.dirname(fileURLToPath(import.meta.url));
const filePath = path.join(__dirname, `../src/routes/routing/${route}.svelte`);
Expand Down