From this thread:
for the unocss plugin, I require doing app.get("/uno.css", () => new Response(css, {...}) to serve cached static assets in development, but when I navigate to /uno.css, it will take me to my routes/_error.tsx page with 404. I cannot tell why it won't work for serving static assets, while it does work for normal routes e.g. app.get("/auth", authPageHandler). I also tried using app.all, app.use, as well as path variants like /static/uno.css, /_fresh/static/uno.css to no success. Is this still pending, or how can we serve static assets via app.<METHOD>? If I let the plugin write a file directly at /static/uno.css (instead of serving it via app.<METHOD>, then it does work...
From
this thread:for the unocss plugin, I require doing
app.get("/uno.css", () => new Response(css, {...})to serve cached static assets in development, but when I navigate to/uno.css, it will take me to myroutes/_error.tsxpage with404. I cannot tell why it won't work for serving static assets, while it does work for normal routes e.g.app.get("/auth", authPageHandler). I also tried usingapp.all,app.use, as well as path variants like/static/uno.css,/_fresh/static/uno.cssto no success. Is this still pending, or how can we serve static assets viaapp.<METHOD>? If I let the plugin write a file directly at/static/uno.css(instead of serving it viaapp.<METHOD>, then it does work...