nksaraf / vinxi

The Full Stack JavaScript SDK
https://vinxi.vercel.app
MIT License
1.33k stars 56 forks source link

Asset imports with `?url` don't work in prodution #270

Open BierDav opened 3 months ago

BierDav commented 3 months ago

Hello, in my vinxi project I have imported an svg using following code:

import linesFull from "~/assets/lines/linesFull.svg?url";

I need the ?url, because instead vite resolves this import with an inlined svg in a url(...) thingens. And this code works completely fine in development.

But when building using vinxi build and running the build using node .output/server/index.mjs the svg again gets inlined, what I don't want.

I think that this is a bug of vinxi, because in bare vite this works fine

BierDav commented 1 month ago

Do need a repro, or when can we expect a bug fix for this. This is a quite essential feature of vite and the fact that it is not working in vinxi is very sad 🥺