Adn*_*nan 5 manifest webpack angular
我想将不同的清单文件部署到我们的暂存和生产环境中。我想知道如何在 Angular.json 中使用 fileReplacement,如下所示:
"configurations": {
"production": {
"fileReplacements": [
{
"replace": "apps/store/src/manifest.webmanifest",
"with": "apps/store/src/manifests/manifest.prod.webmanifest"
}
],
....
}
Run Code Online (Sandbox Code Playgroud)
这可能吗?如果没有,我该怎么做?
谢谢。
到目前为止,没有人找到我的问题的正确答案。我喜欢分享我的解决方法:
使用 NPM 脚本:
包.json:
"manifest:prod": "cp ./apps/store/src/manifests/manifest.prod.webmanifest ./apps/store/src/manifest.webmanifest",
Run Code Online (Sandbox Code Playgroud)
在 Gitlab Ci 中:
script:
- npm install -g @angular/cli
- npm install
- npm run manifest:prod
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
1072 次 |
最近记录: |