-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ViteJS doesn't seem to properly resolve symlinks #2405
Comments
I just tried with Vite 2.1.0 and the issue persists. |
I have the same problem with sveltekit - I opened an issue in sveltekit, but I'll copy the main parts here: Describe the bug I try to symlink a local folder into Logs To Reproduce ln -s ~/path/to/markdown/folder ./src/routes/p I'm using a very simple mdsvex config /** @type {import('@sveltejs/kit').Config} */
const config = {
extensions: [".svelte", ...mdsvexConfig.extensions],
// Consult https://github.com/sveltejs/svelte-preprocess
// for more information about preprocessors
preprocess: [
preprocess({
postcss: true,
}),
mdsvex(mdsvexConfig),
],
kit: {
vite: {
...... Expected behavior If I hardcode it to true instead of false, my code works. vite/packages/vite/src/node/utils.ts Lines 36 to 50 in 8b5a6a8
Additional context |
I'm also having this issue -- I'm using yalc to develop some app dependencies locally. Those dependencies compile to CommonJS modules. I added the dependencies to optimizeDeps since they're found outside of the node_modules folder, and when I do, I get the following error:
|
It would be nice to just have it exposed through the config. Ran into the same issue with shared code for an admin interface inside of svelte-kit. (like @Madd0g ) |
@dbismut @Madd0g , I published a workaround. With it I fake a pnpapi package. Have fun 😉 https://www.npmjs.com/package/@d.reitzner/vite-pnpapi-workaround |
#4708 was just merged, which should fix this |
Describe the bug
ViteJs doesn't properly resolve symlinks.
Reproduction
Repro repo: https://github.com/dbismut/preconstruct-repro
After installing dependencies, please run
yarn vite
.See comment here for hint at a solution.
preconstruct/preconstruct#378 (comment)
Relevant bit from comment
System Info
vite
version: 2.0.5Logs (Optional if provided reproduction)
vite
orvite build
with the--debug
flag.The text was updated successfully, but these errors were encountered: