Pages Bundler configuration

I'm trying to serve some static files from Remix-based pages app. Specifically a SVG file. When building my page with wrangler pages dev, I encounter a build error: ✘ [ERROR] 1 error(s) and 0 warning(s) when compiling Worker. ✘ [ERROR] No loader is configured for “.svg” files: …/app/components/ui/icons/sprite.svg ../app/components/ui/icon.tsx:4:17: 4 │ import href from './icons/sprite.svg' ╵ ~~~~ ✘ [ERROR] Build failed with 1 error: …/app/components/ui/icon.tsx:4:17: ERROR: No loader is configured for “.svg” files: …/app/components/ui/icons/sprite.svg This is esbuild complaining as it's trying to bundle my remix build output (which is mostly javascript, but also a few images and one svg). Is there something I can do to allow this type of file in my project? I just need to exclude this file from bundling, I think, but there doesn't seem to be a way to do that for Pages builds. Any suggestions??
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server