修改node_modules中的包做成补丁保存在项目中。
1、安装patch-package包。
npm install patch-package -D
2、添加postinstall脚本。
编辑package.json,在scripts中添加脚本。
"scripts": {
"postinstall": "patch-package"
}
3、修改node_modules中的包。
修改@terraformer/arcgis。
4、将修改后的包做成补丁。
npx patch-package @terraformer/arcgis
5、其他用户应用补丁。
npm install