We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
打包组件库或者工具库时,我们会将 vue、react、angular 排除打包文件外,而是希望用户使用时自己安装。这时就需要 peerDependencies了。
peerDependencies
只有在发布库文件时才会用到
externals
作用 告诉用户,你使用我的库,还需要具备 vue、react、angular 等环境。在peerDependencies 里的依赖,用户在安装的时候会自动安装
添加 peerDependencies 依赖命令
yarn add <package...> [--peer/-P]
完
The text was updated successfully, but these errors were encountered:
No branches or pull requests
前言
打包组件库或者工具库时,我们会将 vue、react、angular 排除打包文件外,而是希望用户使用时自己安装。这时就需要
peerDependencies
了。各种 dependencies 的比较
externals
排除在打包库文件之外的依赖。比如 vue、react、angularpeerDependencies
作用
告诉用户,你使用我的库,还需要具备 vue、react、angular 等环境。在peerDependencies 里的依赖,用户在安装的时候会自动安装
添加 peerDependencies 依赖命令
参考
完
The text was updated successfully, but these errors were encountered: