Source:https://blog.angularindepth.com/debug-angular-apps-in-production-without-revealing-source-maps-ab4a235edd85 Build application with source map: "build": "ng build --prod --source-map", But now the source maps would be revealed in production. To hide them we simply create another fol...
"build": { "builder": "@angular-devkit/build-ng-packagr:build", "options": { "tsConfig": "projects/my-lib/tsconfig.lib.json", "project": "projects/my-lib/ng-package.json" }, "configurations": { "production": { "tsConfig": "projects/my-lib/tsconfig.lib.prod.json" } } }, ......
const fixture=TestBed.createComponent(AppComponent); const app=fixture.debugElement.componentInstance; expect(app).toBeTruthy(); }); it(`should have as title 'angular7-app'`, () => { const fixture=TestBed.createComponent(AppComponent); const app=fixture.debugElement.componentInstance; expect(app...
"serve": { "builder": "@angular-devkit/build-angular:dev-server", "options": { "browserTarget": "ng-wyy:build", "proxyConfig": "proxy.conf.json" }, "configurations": { "production": { "browserTarget": "ng-wyy:build:production" } } }, 重点是 "proxyConfig": "proxy.conf.json" ...
"logLevel": "debug", "changeOrigin": true } } 然后在package.json中进行配置,让Angular找到我们配置好的proxy.conf.json文件【第一种方法】 { "scripts": { "ng": "ng", "start": "ng serve --proxy-config proxy.conf.json", "build": "ng build", ...
"production": { "browserTarget": "theory-pe:build:production" }, "development": { "browserTarget": "theory-pe:build:development" } }, "defaultConfiguration": "development" }, 二.配置 proxy-config.json {"/api":{"target":"http://192.168.8.209:9001","secure":false,"logLevel":"debug"...
configurations": { "production": { "project": "projects/sf-lib/ng-package.prod.json...库开发后,我们可以通过以下命令进行库的构建: $ ng build --prod sf-lib 小伙伴们,在构建 Library 时,记得始终添加 —prod 标志。...HttpClientModule 模块,且在 DataService 注入 HttpClient 服务: import { Inject...
}, "configurations": { "production": { "tsConfig": "projects/my-lib/tsconfig.lib.prod.json" } } }, ... 1. 2. 3. 4. 5. 6. 关键配置修改 目录布局调整 从目录结构可以看出默认生成的目录结构比较深,参考material design,我们对目录结构进行自定义修改如下: ...
Issue exist from almost all the build I checked , from cli 1.6.3 + ( I can't check before this because it causes some other compile time error ) Also the issue is only with production build , Development build works fine , I tired to debug both the build side by side , Below are...
debug": "^4.3.4", "include-media": "^2.0.0", "material-icons": "^1.13.12", "object-hash": "^3.0.0", "reflect-metadata": "^0.1.13", "rxjs": "^7.8.1", "tslib": "^2.6.2", "uuid": "^9.0.1", "zone.js": "0.14.3" }, "devDependencies": { "@angular-devkit/build...