2

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;
    };
  • Tried to pass --verbose and --configuration="development" without success.

    ng build --verbose --configuration="development"

  • Angular configuration specification doesn't seem to have any option to change log level. https://angular.io/guide/workspace-config

R. Richards
  • 24,603
  • 10
  • 64
  • 64
ShaggyInjun
  • 2,880
  • 2
  • 31
  • 52

1 Answers1

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

Then build using:

ng build --verbose
Acrometis
  • 19
  • 6
  • Thank you for contributing to the Stack Overflow community. This may be a correct answer, but it’d be really useful to provide additional explanation of your code so developers can understand your reasoning. This is especially useful for new developers who aren’t as familiar with the syntax or struggling to understand the concepts. **Would you kindly [edit] your answer to include additional details for the benefit of the community?** – Jeremy Caney Aug 04 '23 at 02:14