How to apply resolve.extensions for dependencies? #18229
Unanswered
hyperstown
asked this question in
Q&A
Replies: 1 comment
-
I'm guessing the error is from esbuild / deps optimization and this is not necessary about |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi I'm migrating some older vue 2 project from webpack to vite. Everything seems to work except one thing that I can't just solve on my own.
My projects depends on
vue-upload-multiple-image
which is just a few vue components and I import it like this:import VueUploadMultipleImage from "vue-upload-multiple-image";
Now the issue I get is:
It seems that vite can't find this component because of lack of file extension. When I go to
node_modules/vue-upload-multiple-image/src/main.js
And edit that line to add.vue
it compiles no problem.I read about
resolve.extensions
so I added.vue
to the list in my config but it didn't work. It works in source code but it doesn't in dependencies.My config:
I tried several versions on vite from 3.x to 5.x and none worked.
Beta Was this translation helpful? Give feedback.
All reactions