android - 离子构建到 /dist 文件夹而不是 /www
问题描述
当我运行时ionic build
,它总是会构建一个新/dist
文件夹,其中包含您通常会在/www
文件夹中找到的所有内容。我正在尝试更新我的/www
文件夹,但它从不更新,只会更新/dist
文件夹。为什么会发生这种情况,为什么我的/www
文件夹拒绝使用/src
代码中的新更改进行更新?
我用--prod
标志构建了我的应用程序几次,这可能是为什么?
解决方案
更改所有版本..
将以下内容更改为
angular-cli.json
(ng1) 或angular.json
(ng2+):"architect": { "build": { "builder": "@angular-devkit/build-angular:browser", "options": { "outputPath": "dist/dev", } } }
拥有多个位置:
构建:
ng build --output-path=dist/dev
或具有多种配置:
ng build --output-path=wwwtest --configuration test
推荐阅读
- python - 最后一个有效项目的子集df - pandas
- email - 使用 imaplib 选择收件箱时,如何处理“文件夹中邮件过多”错误?
- graphql - 内容丰富的 graphql 从内容的媒体字段中获取指向图像的链接
- c# - 我不断收到错误消息,即我的 .NET 模型需要具有 0 args 或仅可选 args 的构造函数?
- javascript - 如何在 React 中访问和更新对象数组中的字段?
- ruby-on-rails - 来自 Github 的 gem rails 没有更新
- docker - 使用 fabric-samples 文件夹启动 Hyperledger Fabric 的测试网络时的端口冲突
- javascript - 通过点击事件监听器获取嵌套元素的属性值
- javascript - 使用正交相机时 GLTF 对象的纹理消失
- heroku - 在 Heroku 中使用 Ncat 进行代理身份验证