In an Astro app, I am consuming an (in-house) React component library where the components import their own styling which is expressed in files such as Foo.css.map
(for the Foo
component).
As I am using api routes, I have files such as pages/samples/[id].astro
.
But when the library components render within [id].astro
and perform their own imports, the [id].astro
file additionally renders with id
having values like Foo.css.map
.
I only want [id].astro
to be invoked when the requested url ends with Foo
, not Foo.css.map
.
How can I exclude certain file patterns from turning into API routes?
Perhaps something to do with how I name the pages/samples/[id].astro
file?