Skip to content

Report file errors on loader #8058

Closed
Closed
@filipesilva

Description

@filipesilva

Currently compilation errors get reported in the entry points (polyfills.ts, main.ts) and for the compilation itself afterwards:

ERROR in ./src/polyfills.ts
Module build failed: Error: TypeScript compilation failed.
    at plugin.done.then (/Users/iminar/tmp/regression-test-project/node_modules/@angular/cli/node_modules/@ngtools/webpack/src/loader.js:479:27)
 @ multi ./src/polyfills.ts
ERROR in ./src/main.ts
Module build failed: Error: TypeScript compilation failed.
    at plugin.done.then (/Users/iminar/tmp/regression-test-project/node_modules/@angular/cli/node_modules/@ngtools/webpack/src/loader.js:479:27)
    at process._tickCallback (internal/process/next_tick.js:103:7)
 @ multi ./src/main.ts
ERROR in Error: Unexpected value 'MdIconModule in /Users/iminar/tmp/regression-test-project/node_modules/@angular/material/material.d.ts' imported by the module 'AppModule in /Users/iminar/tmp/regression-test-project/src/app/app.module.ts'. Please add a @NgModule annotation.

We should instead report errors for a given file on the file loader, and the rest of these errors in the compilation.

Metadata

Metadata

Assignees

Labels

P1Impacts a large percentage of users; if a workaround exists it is partial or overly painfultype: bug/fix

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions