From 158d70dd27509d9cf41f6de6e95a974fea61559a Mon Sep 17 00:00:00 2001 From: Alec Aivazis Date: Wed, 22 Jan 2025 23:48:34 -0800 Subject: [PATCH] Fix import path resolution issue (#1423) --- .changeset/tender-sloths-shave.md | 5 +++++ packages/houdini-svelte/src/plugin/fsPatch.ts | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 .changeset/tender-sloths-shave.md diff --git a/.changeset/tender-sloths-shave.md b/.changeset/tender-sloths-shave.md new file mode 100644 index 000000000..ff1ef3c6a --- /dev/null +++ b/.changeset/tender-sloths-shave.md @@ -0,0 +1,5 @@ +--- +'houdini-svelte': patch +--- + +Fix bug preventing vite6 from importing the generated root layout diff --git a/packages/houdini-svelte/src/plugin/fsPatch.ts b/packages/houdini-svelte/src/plugin/fsPatch.ts index 5481ff9c0..5b1925504 100644 --- a/packages/houdini-svelte/src/plugin/fsPatch.ts +++ b/packages/houdini-svelte/src/plugin/fsPatch.ts @@ -24,8 +24,11 @@ export default (getFramework: () => Framework) => if (match) { return path.join(config.projectRoot, filepath.substring(match[1].length)) } + // if there is no deep relative import, do the default thing - return + return filepath.startsWith('/src') + ? { id: path.join(config.projectRoot, filepath) } + : null } // everything internal to houdini should assume posix paths