diff options
-rw-r--r-- | .changeset/early-kangaroos-invent.md | 5 | ||||
-rw-r--r-- | packages/integrations/cloudflare/src/index.ts | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/.changeset/early-kangaroos-invent.md b/.changeset/early-kangaroos-invent.md new file mode 100644 index 000000000..e2de06919 --- /dev/null +++ b/.changeset/early-kangaroos-invent.md @@ -0,0 +1,5 @@ +--- +'@astrojs/cloudflare': patch +--- + +fix `config.base` trimming logic for cloudflare integration `_routes.json` generation diff --git a/packages/integrations/cloudflare/src/index.ts b/packages/integrations/cloudflare/src/index.ts index 2f182d604..6cdfdd96c 100644 --- a/packages/integrations/cloudflare/src/index.ts +++ b/packages/integrations/cloudflare/src/index.ts @@ -156,7 +156,7 @@ export default function createIntegration(args?: Options): AstroIntegration { let pagePath = prependForwardSlash(page.pathname); if (_config.base !== '/') { const base = _config.base.endsWith('/') - ? _config.base.substring(0, -1) + ? _config.base.slice(0, -1) : _config.base; pagePath = `${base}${pagePath}`; } |