vite
dev incompatible with vercel dev
- ?import
query param expects JS
#3781
Labels
vite
dev incompatible with vercel dev
- ?import
query param expects JS
#3781
Describe the bug
I am unable to use vite with vercel dev CLI command that allows local hosting of vercel serverless functions.
I believe the core issue is that
vercel dev
eagerly returns source files when they exist, so static assets i.e./src/image.svg?import
will immediately resolve to/src/image.svg
. The vite server seems to use the?import
query param to hijack the request and return a small JS file with the asset exportedI'm not sure if the best path is for
vercel dev
to honor the?import
query param and handoff to vite, or if there should be an option to resolve the static asset URLs directly in vite's dev environment.Reproduction
vercel dev
I have a more detailed breakdown in a discussion on the vercel github:
vercel/vercel#6356
System Info
Output of
npx envinfo --system --npmPackages vite,@vitejs/plugin-vue --binaries --browsers
:Used package manager: npm
Before submitting the issue, please make sure you do the following
The text was updated successfully, but these errors were encountered: