diff --git a/.changeset/curvy-apes-fry.md b/.changeset/curvy-apes-fry.md new file mode 100644 index 000000000..cb88ac56a --- /dev/null +++ b/.changeset/curvy-apes-fry.md @@ -0,0 +1,5 @@ +--- +'houdini-react': patch +--- + +Fix bug when dash present in route name diff --git a/e2e/react/src/routes/hello/+page.gql b/e2e/react/src/routes/hello-world/+page.gql similarity index 100% rename from e2e/react/src/routes/hello/+page.gql rename to e2e/react/src/routes/hello-world/+page.gql diff --git a/e2e/react/src/routes/hello/+page.tsx b/e2e/react/src/routes/hello-world/+page.tsx similarity index 100% rename from e2e/react/src/routes/hello/+page.tsx rename to e2e/react/src/routes/hello-world/+page.tsx diff --git a/packages/houdini/src/lib/router/conventions.ts b/packages/houdini/src/lib/router/conventions.ts index fdf698d88..e524c113b 100644 --- a/packages/houdini/src/lib/router/conventions.ts +++ b/packages/houdini/src/lib/router/conventions.ts @@ -98,7 +98,7 @@ export function page_id(path: string) { if (path.endsWith('/') && path.length > 1) { path = path.substring(0, path.length - 1) } - const special_chars = ['/', ']', '[', '(', ')'] + const special_chars = ['/', ']', '[', '(', ')', '-'] const mask = '_' let copy = ''