-
-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Closed
Labels
Description
Describe the bug
Background: In Nuxt, we need to use the CJS versions of some Vue dependencies as these will not suffer from memory leaks when running on the server. (The ESM versions should not be run on the server.) So we alias them in advance in resolve.alias
.
The bug: When using the new optimizeDeps treatment in Vite, dependencies aliased to absolute paths are not processed, leading to an error like:
Error: 'isFunction' is not exported by node_modules/@vue/shared/dist/shared.cjs.prod.js, imported by src/main.js
(Possible workaround seems to be not fully resolving them.)
Reproduction
https://stackblitz.com/edit/vitejs-vite-r2pbvz
System Info
Stackblitz with:
{
"@vue/shared": "^3.2.37",
"vite": "~3.0.0-beta.5"
}
Used Package Manager
npm
Logs
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.