Questions tagged [angular-builder]
84 questions
19
votes
4 answers
Angular 11 - ng serve - Option "sourceMap" is deprecated
I updated Angular project from Angular 10 to 11x. Everything works normally, except for one warning on running project using ng serve (without any option in ng serve). The warning is:
Option "sourceMap" is deprecated: Use the "sourceMap" option in…

viking
- 411
- 1
- 5
- 14
18
votes
3 answers
Share a angular library across multiple projects
I am working on a angular 7+ project which is composed of backend + frontend. Now i am shot with a requirement where i need to create one more project which comprises of frontend+backend. But there are some reusable frontend code that is present…

Vikhyath Maiya
- 3,122
- 3
- 34
- 68
16
votes
3 answers
Angular CLI custom builder
Angular CLI 6 introduced a new concept of builders (aka Architect Targets).
There are a couple of prebuilt builders that come with @angular-devkit/build_angular, but unfortunately there is no documentation that explains how to create your own…

JeB
- 11,653
- 10
- 58
- 87
14
votes
2 answers
Angular 6, after ng build index.html gets errors in console
I'm facing a issue please help me to resolve this.
The issue is that when I do ng build in my CLI and go to the dist folder and run index.html file so the console get the errors of files path.
Failed to load resource:…

Zain Khan
- 1,644
- 5
- 31
- 67
11
votes
3 answers
Angular Ivy compiler and webpack
We would like to use the new Angular 8 Ivy compiler with webpack. We don't use Angular CLI. Is this possible? How can this be done? I can't seem to find information regarding this requirement.

stephan.peters
- 963
- 13
- 35
10
votes
3 answers
Angular main.js file large size
My project user angular version 7, and here is the angular.json configuration
when I build for production my main.js file is way too large nearly 12MB in size which makes my app to load the page very slowly. Nearly the initial load tooks 4 - 5…

VinoPravin
- 947
- 3
- 17
- 32
7
votes
3 answers
How to add Google fonts library with angular 6?
I added Google fonts link in styles.scss file of Angular project.
@import url('https://fonts.googleapis.com/css?family=Roboto:100,100i,300,300i,400,400i,500,500i,700');
But It already works with Angular CLI command ng serve, but, trying to build…

RedAnz
- 89
- 2
- 2
- 12
6
votes
1 answer
How to change webpack module export require string?
When creating bundle with webpack, for example, it outputs angular as follows.
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */…

Muhammet Can TONBUL
- 3,217
- 3
- 25
- 37
5
votes
2 answers
Angular build - Unmatched selector: %
When I run npm run build which executes ng build -c production build will be completed as expected. But command prompt will be filled with this warning:
Warning: 303 rules skipped due to selector errors:
0% -> Unmatched selector: %
20% ->…

Mahdi Zarei
- 5,644
- 7
- 24
- 54
5
votes
1 answer
Run customWebpackConfig in Angular 13
I recently updated to Angular 13 from Angular 11 with the latest gratest packages of all components I need and I'm struggling to get the custom-webpack angular builder to run when I perform ng serve.
In my scenario, I perform the CSS optimization…

Carlos Torrecillas
- 4,965
- 7
- 38
- 69
5
votes
0 answers
Angular' BuilderContext.reportStatus doesn't seem to report anything to console
According to the angular-cli documentation BuilderContext.reportStatus() should be used to report status of the builder's activity, but I see nothing (using "@angular-devkit/architect": "^0.802.0"), while BuilderContext.logger.info() does, indeed,…

Yuri Dolzhenko
- 242
- 2
- 7
4
votes
1 answer
How to fix Angular 11 'Option "progress" is deprecated'?
I'm missing the percentage progress view while compiling an Angular 11. Usually I did:
ng serve
and saw a progress in percent while the code was compiled. Now that percentage view is gone and it's written that progress is deprecated:
Option…

Lars
- 920
- 1
- 14
- 34
4
votes
0 answers
How can I debug an Angular 9 compilation error with IVY enabled?
Currently I am updating a project to Angular 9. Unfortunately I can not build it with IVY. The error message is
ERROR in Cannot resolve type entity ɵngcc14.ɵu to symbol
Without disabled IVY the project builds and serves properly. I think, it is…

Felix Lemke
- 6,189
- 3
- 40
- 67
3
votes
0 answers
How to create a single bundle with CSS and JS files?
I'm creating web components in Angular by grabbing .js files which include runtime.js, polyfills.js and main.js and concatenating them into single file called list.js by using below code
const fs = require('fs-extra');
const concat =…

Raghav
- 1,139
- 4
- 15
- 35
3
votes
1 answer
Angular inline resources in css as data-uri
Is there any way in Angular app without ejecting webpack configuration to have inlined resources, as SVGs in CSS background properties?
I have already tried custom webpack builder to remove built-in file-loader rule and add uri-loader, but, SVGs are…

Zygimantas
- 8,547
- 7
- 42
- 54