Astro Info
Astro v4.0.9
Node v20.9.0
System macOS (arm64)
Package Manager npm
Output static
Adapter none
Integrations @astrojs/mdx
@astrojs/sitemap
@astrojs/tailwind
astro-robots-txt
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
The static file endpoint docs specify that only .js and .ts files can be used for creating endpoints, and indeed creating a .tsx file results in the route not being loaded.
If I want to use JSX in this route, this means I have to create a separate .tsx file and import that from my .ts file which is annoying.
If there is no specific technical reason why only .ts files are allowed, then we should also allow .tsx files.
For reference, I'm using satori which accepts JSX elements.
What's the expected result?
Adding a .tsx file that contains an endpoint should work.
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-dclnmg?file=src%2Fpages%2Ftest.json.ts
Participation
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
The static file endpoint docs specify that only
.jsand.tsfiles can be used for creating endpoints, and indeed creating a.tsxfile results in the route not being loaded.If I want to use JSX in this route, this means I have to create a separate
.tsxfile and import that from my.tsfile which is annoying.If there is no specific technical reason why only
.tsfiles are allowed, then we should also allow.tsxfiles.For reference, I'm using satori which accepts JSX elements.
What's the expected result?
Adding a
.tsxfile that contains an endpoint should work.Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-dclnmg?file=src%2Fpages%2Ftest.json.ts
Participation