antfu / vscode-vite

One step faster for Vite in VS Code ⚡️
https://marketplace.visualstudio.com/items?itemName=antfu.vite
449 stars 25 forks source link

Issue with configuration: server starts in wrong location #38

Open ManfredLange opened 10 months ago

ManfredLange commented 10 months ago

My repository root is at location /work

The app using Vite is at /work/app

I tried setting the base path for opening the app (Base path for open the app) to /work/app but that didn't work as it still thinks that it should start in /work instead of /work/app

I tried changing the setting "Vite: Dev Command" to cd /work/app && npm run dev. It now does something but now it shows the following error:

[vite] Internal server error: Failed to resolve entry for package "/work/app". The package may have incorrect main/module/exports specified in its package.json.

However, running npm run dev in directory /work/app works just fine.

Note that the VS Code workspace is the root of the local clone. That directory is /work.

I've run out of ideas what else to try. Any and all suggestions would be very much appreciated!

jacksonthall22 commented 7 months ago

Ever find a solution to this? I'm getting something similar