欢迎各位兄弟 发布技术文章

这里的技术是共享的

You are here

ng build 构建文件 生成的目录路径 相对路径(本来默认) 绝对路径 有大用 有大大用

angular.json  中 原来默认是相对路径 

 "outputPath""dist/taskmgr",


下面这个是改成了绝对路径 

E:/xampputf8/htdocs/saas.shrszg.com/public/app

也可以是(不过这个没有测试过) /xampputf8/htdocs/saas.shrszg.com/public/app


"build": {
          "builder""@angular-devkit/build-angular:browser",
          "options": {
            "outputPath""E:/xampputf8/htdocs/saas.shrszg.com/public/app",
            "index""src/index.html",
            "main""src/main.ts",
            "polyfills""src/polyfills.ts",
            "tsConfig""tsconfig.app.json",
            "aot"false,
            "assets": [
              "src/favicon.ico",
              "src/assets"    
            ],
            "styles": [
              "src/styles.css"    
            ],
            "scripts": []
          },


普通分类: