Here my project name is angulardemo so I build project using this command
ng build --prod --base-href /angulardemo/
so this command build project and create dist folder and inside dist folder create anglulardemo named folder and inside angulardemo folder create below files
3rdpartylicenses.txt
favicon.ico
index.html
main.95e7fd4eb2e659e65554.js
polyfills.1ef83d22ada557f4a131.js
runtime.ec2944dd8b20ec099bf3.js
styles.3ff695c00d717f2d2a11.css
but I want to create this files directly in dist folder don't want create angulardemo folder inside dist folder how It is possible ?
You can change output path in angular.json
{
"projects": {
"my-app-name": {
"architect": {
"options": {
"outputPath": "dist", <-----here
With the new version of angular (v6+) and the angular CLI it goes inside the dist directory/yourproject by default.
Although you can change build options inside angular.json:
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist",
"index": "src/index.html",
"main": "src/main.ts",
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With