【发布时间】:2021-06-04 13:05:12
【问题描述】:
我在 Azure Devops 构建管道中使用缓存任务,因为我想缓存我的 NPM 包,这样就不必在每次运行构建时都下载它们。
要缓存我的解决方案的 node_modules 文件夹,我应该在路径输入中使用 $(System.DefaultWorkingDirectory)/node_modules 还是仅使用 node_modules ?
【问题讨论】:
标签: npm azure-devops node-modules
我在 Azure Devops 构建管道中使用缓存任务,因为我想缓存我的 NPM 包,这样就不必在每次运行构建时都下载它们。
要缓存我的解决方案的 node_modules 文件夹,我应该在路径输入中使用 $(System.DefaultWorkingDirectory)/node_modules 还是仅使用 node_modules ?
【问题讨论】:
标签: npm azure-devops node-modules
如果要缓存npm的node_modules,那么path的值应该是$(Pipeline.Workspace)/.npm/lib/node_modules。
您可以点击this document了解详细信息。
【讨论】: