Skip to content
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

feat(mp): 支持npm link&monorepo等不在root路径下的软链接引用 #5108

Open
wants to merge 1 commit into
base: next
Choose a base branch
from

Conversation

dtntakk
Copy link

@dtntakk dtntakk commented Aug 25, 2024

将npm link/mpnorepo等软链接的引入路径的产物路径格式化到当前根目录下

原有实现:直接设置resolve.preserveSymlinks = true,在monorepo下,嵌套的对同一个包的引用会导致重复打包多次
vite在resolverId时解析的package.json路径是软连接的,嵌套的node_modules下的引用导致对同一个包的引用resolve出不同的id vite:resolve packages

normalizeMiniProgramFilename这里如果支持引用不在根路径下的外部依赖,至少提供了用户可以不开启preserveSymlinks 的选择

相关问题:关于monorepo开发项目,相同package被重复编译至vendor.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant