首页 > 解决方案 > 如何排除 angular.json 中的脚本文件?

问题描述

我正在用 Angular 6 开发一个项目,我有一些第三方 js 文件需要在 .ts 文件中使用,所以我在 angular.json 的脚本数组中添加了这些文件。

角.json

 "scripts": [
          "node_modules/jquery/dist/jquery.min.js",
          "node_modules/bootstrap/dist/js/bootstrap.min.js",
          "src/thirdParty/libs/localize.js",
          "src/thirdParty/libs/index.js"
        ]

并且我将最后两个脚本文件用于开发而不是用于生产,有没有办法在 ng build 中排除这两个文件?

谢谢

标签: angulartypescript

解决方案


推荐阅读