#dev server returns url for imported assets

1 messages · Page 1 of 1 (latest)

lament pecan
#

I have an application that I have recently swtiched to vite which is incorrectly importing assts in dev. Specifically, regardless of which suffix is added, the import resolves to the asset url. This is not a problem when building for production. It's also not a problem when the page is being server-side rendered. This only occurs when the code reaches the browser.

Would really appreciate any suggestions to isolate the issue further. Thanks.

lament pecan
#

Not sure if this is signifcant but using vite-plugin-inspect, I can see that there is a transform by vite:import-analysis which converts the import suffix from ?raw to ?import&raw