From 8ff24c572240488cb08993823c045de00aec63c2 Mon Sep 17 00:00:00 2001 From: Andreas Fehn Date: Sun, 7 Jan 2024 00:36:00 +0100 Subject: [PATCH] replace colons in route identifiers --- .changeset/tough-bees-smoke.md | 5 +++++ packages/vite-plugin-kit-routes/src/lib/plugin.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/tough-bees-smoke.md diff --git a/.changeset/tough-bees-smoke.md b/.changeset/tough-bees-smoke.md new file mode 100644 index 00000000..26fdc211 --- /dev/null +++ b/.changeset/tough-bees-smoke.md @@ -0,0 +1,5 @@ +--- +'vite-plugin-kit-routes': minor +--- + +Replace colons in path identifiers diff --git a/packages/vite-plugin-kit-routes/src/lib/plugin.ts b/packages/vite-plugin-kit-routes/src/lib/plugin.ts index 705b3aab..a63d1d3f 100644 --- a/packages/vite-plugin-kit-routes/src/lib/plugin.ts +++ b/packages/vite-plugin-kit-routes/src/lib/plugin.ts @@ -282,7 +282,7 @@ export function formatKey(key: string, o: Options) { return toRet } - const toReplace = ['/', '[', ']', '(', ')', '-', '=', '.'] + const toReplace = ['/', '[', ']', '(', ')', '-', '=', '.', ':'] toRet = toRet .split('') .map(c => (toReplace.includes(c) ? '_' : c))