diff --git a/.changeset/young-pens-exist.md b/.changeset/young-pens-exist.md new file mode 100644 index 000000000000..55468bba51a3 --- /dev/null +++ b/.changeset/young-pens-exist.md @@ -0,0 +1,5 @@ +--- +'@sveltejs/kit': patch +--- + +fix manifest not updating when adding routes diff --git a/packages/kit/src/core/dev/plugin.js b/packages/kit/src/core/dev/plugin.js index 0736eaca4640..bd5717329acd 100644 --- a/packages/kit/src/core/dev/plugin.js +++ b/packages/kit/src/core/dev/plugin.js @@ -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)` + ] } } }, diff --git a/packages/kit/test/apps/basics/test/test.js b/packages/kit/test/apps/basics/test/test.js index cb159068c791..0fd222ab4c74 100644 --- a/packages/kit/test/apps/basics/test/test.js +++ b/packages/kit/test/apps/basics/test/test.js @@ -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`);