Questions tagged [angularbuild]
36 questions
1
vote
0 answers
Make ng build output .min.js and .min.js.map instead of .js and .js.map
I am trying to change the format of the minified code with sourcemaps output by ng build - c staging. The current extensions are by default .js and .js.map. However, I am interested in having the extensions in .min.js and .min.js.map. Is there any…

JIAN CHEN
- 33
- 4
1
vote
2 answers
How to add custom script in the index.html at the end of the body when using the npm run build command in Angular 7?
Is there anyway that we can append a script file in the index.html after we build our angular app?
things that i have tried:
{
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": { ... },
"configurations": {
…

john
- 796
- 1
- 13
- 34
0
votes
2 answers
Angular build takes too long
When I want to build my Angular project It takes more than 50 minutes. I searched a lot but did not find any solution...
I used the following command and did not work:
ng build --configuration production --aot --vendor-chunk --common-chunk…

AR Second
- 582
- 1
- 6
- 25
0
votes
0 answers
Why after migrating angular from 8 to 9 i'm getting exceeded maximum budget on scss files
I migrated my Angular project from 8 to 9
When i execute the command ng build --prod
I'am getting multiple errors on scss files similar to the following :
ERROR in Exceeded maximum budget for…

Hassen Gaaya
- 80
- 9
0
votes
0 answers
angular run build error - error TS1256: A rest element must be last in a tuple type
I have an angular application in which i am facing issue while building on azure pipeline
ERROR in node_modules/socket.io-client/build/esm/socket.d.ts:29:56 - error TS1256: A rest element must be last in a tuple type.
29 export declare type Last

Sunil Garg
- 14,608
- 25
- 132
- 189
0
votes
1 answer
Angular Element - Custom web component - bundle
I have developed a custom web component that I am using in a Chrome Extension (Content). This Angular web component worked fine in Angular 12. I bundled all the scripts and loaded them in various web pages without issues. So I got this bright idea…

Tom Lee
- 11
- 1
- 3
0
votes
0 answers
I am facing issue in --prod during production build generation
Problem statement: I want to minify my all scripts which is why I am using the --prod tag in my build script but it's causing an issue without the --prod tag my build is generated successfully but the build size is large.
with the --prod tag I am…

AmirSoahil
- 13
- 6
0
votes
0 answers
Develop Angular library and test in demo app without change import
I everyone, I have an Angular project structured like following
├── projects
│ ├── lib-1
│ ├── lib-2
│ ├── lib-wrapper
│ .
│ .
│
└── src
├── app
├── assets
.
.
in particular I not only develop library but also the…

Edo2610
- 184
- 1
- 9
0
votes
0 answers
How can stop angular to convert my font file into base64 in build?
When I am building my angular lib, My TTF file getting converted into base64.
But I want to transfer my ttf file in build and css should point to that only.

Sujeet Kumar
- 159
- 6
0
votes
1 answer
at-rule or selector expectedcss(css-ruleorselectorexpected)
When I try to build angular application and open the files in dist folder like index.html and try running these file on a live server it gives me this error
at-rule or selector expectedcss(css-ruleorselectorexpected)
specially on the lines…

Bahy
- 169
- 7
0
votes
0 answers
How can I separate the firebase credentials from the production build that I get in Angular 2+?
I need to build the same code and connect to different it to different firebase backends, I have to build it each time by changing the firebase credentials in the source files.
Is there a easy to achieve this ?

Utkarsh
- 50
- 8
0
votes
1 answer
How to do a wildcard file replacement during build in angular projects?
I have an angular2+ project with scss styles. I'm targeting 2 apps: mobile (ionic) and web with the same codebase.
Due to the need to load totally different stylesheets for some of the components, I'm thinking to do the following: save web styles…

Lorraine R.
- 1,545
- 1
- 14
- 39
0
votes
0 answers
Someone can help me to solve angular "ERROR in Cannot read property 'length' of undefined"?
I'm using "@angular/cli": "~9.1.13" and when try to build my project in production (ng build --prod) mode, I get an error:
ERROR in Cannot read property 'length' of undefined
0
votes
1 answer
ASP.NET Core Angular wrong CSS in production environment
I am developing an ASP.NET Core WebAPI application with Angular template (the initial Angular app is generated by ASP.NET).
When I run the app locally, everything works as expected. But, a published app receives an extra CSS which breaks the layout…

dzenesiz
- 1,388
- 4
- 27
- 58
0
votes
1 answer
Angular Build Issue - Error in type is not defined
I am facing strange issue while building angular project. I do not know why its happening.
Following is the error
"ERROR in type is not defined
i 「wdm」: Failed to compile.
i 「wdm」: Compiling...
16% building modules 3/5 modules 2 active…

Hunzla Ali
- 383
- 2
- 5
- 22