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

开发中问题汇总 #23

Open
jackson-yyy opened this issue Aug 22, 2021 · 0 comments
Open

开发中问题汇总 #23

jackson-yyy opened this issue Aug 22, 2021 · 0 comments
Labels
documentation Improvements or additions to documentation

Comments

@jackson-yyy
Copy link
Owner

jackson-yyy commented Aug 22, 2021

  1. 为什么选择了pnpm,而不是yarn/npm
  • 下载速度快
  • 能避免幽灵依赖
  1. vue2/vue3同时打包问题
    利用软连接动态变更vue-render/node_modules/vue所指向的vue,
    同时vue-demi切换版本时,unlink软连接(这里因为vue-demi切换版本的脚本有bug,提了修改 pr ),
    这样处理完后,vue-demi直接指向的就不是软连接里的vue,而是当前node_modules下的vue,
    这样就能保证打包时加载到正确的vue版本了
  2. 怎么同时启动vue2和vue3的demo的?
  • 利用pnpm的readPackge hooks, 在本地强行给demo-vue2/3安装一个vue-demi
  • 在vite.config.ts里,取消@chill-schema-form/vue-render的预编译,项目中当做源码引入,将vue-demi当做external,用当前node_modules下的vue-demi作为源,这样就能保证vue-demi引用到特定的vue版本
@jackson-yyy jackson-yyy added the documentation Improvements or additions to documentation label Aug 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant