withastro/adapters

Routing issues with tsx components

Closed this issue · 1 comments

Astro Info

Astro                    v3.4.4
Node                     v18.18.0
System                   Windows (x64)
Package Manager          pnpm
Output                   server
Adapter                  @astrojs/cloudflare
Integrations             @astrojs/tailwind
                         @astrojs/react
                         @astrojs/mdx

Describe the Bug

A continuation of a Discord discussion, hard to parse as half is in a thread while some isn't , but the convo starts here (for easy tracking)

When using Cloudflare, we're hitting an issue with the routes file being over 100 lines long. Investigating, a lot are tsx components, and fonts. using strategy: "include" in a public repo didn't help (output is in the README), and in a private repo I can't share the code for only generated

So something is causing tsx & fonts to be added to the routes. Speaking with Alex in Discord, we decided to move forward to an issue to help work on this 💪

What's the expected result?

Hopefully a correctly generated routes.json that'll stop problems with the 100 limit, but work as expected . A workaround right now is a manually created file, which isn't going to be best in the long run we imagine and want to help get this feature up and running correctly as we imagine it'll be vital to us in the future.

I don't have a minimal reproducible, only a public repo currently. I'll try add one tomorrow (it's getting late and I got work)

Link to Minimal Reproducible Example

https://github.com/doras-to/doras/tree/route-checking

Participation

  • I am willing to submit a pull request for this issue.

Yup I'm running to this exact issue right now.. (https://discord.com/channels/830184174198718474/1203126964307624106)