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
dependency of dependency cannot be inlined #1452
Comments
This is not a bug, that you cannot inline dependency of a dependency. You need to inline both. Explanation: When dependency is not inlined, it will use native When you inline both, you still have an error, because The other error is interesting. Something failed, and we try to get a stacktrace, but for some reason file doesn't exist? Can you open a separate issue for this one? I think we are receiving the path to source mapped location, but location doesn't exist. |
If you need an immediate solution, you can also add this to your vite config (deps should still be inlined): resolve: {
mainFields: ["module"],
}, But, please, open an issue with |
Closing issue, since the problem is with upstream packages. |
Thanks @sheremet-va ! For those who meet similar issues from upstream packages, you can use https://github.com/milahu/patch-package to modify |
I solved this problem by following a few other threads and installing a dev dependency, "https://www.npmjs.com/package/@originjs/vite-plugin-commonjs" Next I modified vitest.config.js as follows:
Hope it helps. |
Describe the bug
I'm using vue-echarts which depends on echarts in my vite project.
I've add echarts in deps.inline but vitest still throws the following error:
if I add 'vue-echarts' in
deps.inline
, another error is thrown:Reproduction
stackblitz.com/edit/vitest-dev-vitest-fhmvl9
System Info
Used Package Manager
pnpm
Validations
The text was updated successfully, but these errors were encountered: