Closed fl0wo closed 8 months ago
When deploying using SST I get an Trace: RangeError: Maximum call stack size exceeded
Trace: RangeError: Maximum call stack size exceeded
This is due the fact that the OpenAPI plugin is injecting a very greedy route at the root of the site which conflicts with the root level matching route.
Ref: sst.buildMeta.json
sst.buildMeta.json
{ "route": "/[...openapislug]", "type": "page", "pattern": "/^(?:\\/(.*?))?\\/?$/", "prerender": true }, { "route": "/[...slug]", "type": "page", "pattern": "/^(?:\\/(.*?))?\\/?$/", "prerender": true }
More details at this Issue: https://github.com/sst/sst/issues/3707
Have a customizable "pattern" field in the Astro Integration:
export function starlightOpenAPIIntegration(schemas: Schema[]): AstroIntegration { const starlightOpenAPI: AstroIntegration = { name: 'starlight-openapi', hooks: { 'astro:config:setup': ({ injectRoute, updateConfig }) => { injectRoute({ entrypoint: 'starlight-openapi/route', pattern: `[...openAPISlug]`, // <- i would like to place this in a sub-folder /abc/[...openAPISlug] prerender: true, }) updateConfig({ vite: { plugins: [vitePluginStarlightOpenAPISchemas(schemas)], }, }) }, }, }
No response
https://discord.com/channels/983865673656705025/1068236979659092038/1217354520086974515
Thanks for the report, very interesting. Is this something that is fixed by this PR as it's tagged as closing your issue or is it still an issue?
Is your feature request related to a problem?
When deploying using SST I get an
Trace: RangeError: Maximum call stack size exceeded
This is due the fact that the OpenAPI plugin is injecting a very greedy route at the root of the site which conflicts with the root level matching route.
Ref:
sst.buildMeta.json
More details at this Issue: https://github.com/sst/sst/issues/3707
Describe the solution you'd like
Have a customizable "pattern" field in the Astro Integration:
Describe alternatives you've considered
No response
Additional Context
https://discord.com/channels/983865673656705025/1068236979659092038/1217354520086974515