ShaggyInjun
ShaggyInjun

Reputation: 2963

Enable debug logs in `ng build`

How do I enable debug logs in ng build ? I want to see what the basePath is. The snippet below is from program_based_entry_point_finder.js.

node_modules\@angular\compiler-cli\ngcc\src\entry_point_finder\program_based_entry_point_finder.js

    ProgramBasedEntryPointFinder.prototype.walkBasePathForPackages = function (basePath) {
        var _this = this;
        this.logger.debug("No manifest found for " + basePath + " so walking the directories for entry-points.");
        var entryPoints = utils_1.trackDuration(function () { return _this.entryPointCollector.walkDirectoryForPackages(basePath); }, function (duration) { return _this.logger.debug("Walking " + basePath + " for entry-points took " + duration + "s."); });
        this.entryPointManifest.writeEntryPointManifest(basePath, entryPoints);
        return entryPoints;
    };

Upvotes: 6

Views: 8034

Answers (2)

Hameed Syed
Hameed Syed

Reputation: 4275

If you are using angular 17 then below is the command to check logs during the build

ng build -c production --verbose

Upvotes: 2

Acrometis
Acrometis

Reputation: 60

"build": {
      "builder": "@angular-devkit/build-angular:browser",
      "options": {
        "verbose": true
       }
}

Then build using:

ng build --verbose

Upvotes: 1

Related Questions