-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Issue with optimizeDeps #1408
Comments
I run with the same problem, it seems like that the typescript file vue component only compatible with typescript one,while when you use javascript component then the error occur. |
So - this is technically because I would recommend library authors to start using Vite to build and distribute libraries targeting Vue 3. |
I have same problem with oidc-client =( |
This issue has been locked since it has been closed for more than 14 days. If you have found a concrete bug or regression related to it, please open a new bug report with a reproduction against the latest Vite version. If you have any other comments you should join the chat at Vite Land or create a new discussion. |
Describe the bug
While upgrading from 1.0.0-rc.13 to 2.0 the
optimizeDeps
stopped working for the dependency I was using. Before (in v1.x), it was not detected automatically and had to add it to theoptimizeDeps.include
property in thevite.config
file; now, it does gets auto detected but it gives me the following error in the browser once vite finishes building:Uncaught SyntaxError: The requested module '/node_modules/vue/dist/vue.runtime.esm-bundler.js?v=3.0.5' does not provide an export named 'default'
However, if I exclude the dependency optimization (
optimizeDeps.exclude
) I get the original message I was getting in v1.x before explicitly asking to optimize this dependency:Uncaught SyntaxError: The requested module '/node_modules/vue-cal/dist/vuecal.common.js?v=4.2.0' does not provide an export named 'default'
I don't know if missed any step in the migration guide or what is causing this issue, any help would be really appreciated.
Reproduction
I've created a small repo with the template
vue-ts
project with this dependency added.Just by running
npm run dev
you should be able to see the error message in the browser.System Info
vite
version: 2.0.0-beta.9Logs
Vite's output looks normal, it doesn't give any error or warning.
The text was updated successfully, but these errors were encountered: