issues
search
sleepyShen1989
/
blog
MIT License
0
stars
0
forks
source link
【实战】如果项目中的第三方依赖有bug
#23
Open
sleepyShen1989
opened
1 year ago
sleepyShen1989
commented
1 year ago
基本思路
替代品
自己造轮子
提PR(会遇到的问题)
作者不认为是bug
作者不维护了
作者忙,维护的慢
不一定很快publish
解决方案
选择以下任一一种
github fork -> bug fix -> npm i
https://github.com/yourname/xxx.git
github fork -> bug fix -> publish it with another name -> change package name (
require('lodash') => require('my-lodash')
)
github fork -> bug fix -> publish it with another name -> pnpm add lodash@npm:my-lodash
patch-package
: 如果使用pnpm管理会有问题
pnpm patch
命令
参考资料
你的依赖包有bug怎么办?不要慌,pnpm alias解救你
patch-package
pnpm patch
基本思路
解决方案
选择以下任一一种
require('lodash') => require('my-lodash')
)参考资料