Skip to content

Improve error message in AOT webpack plugin if AOT compile fails #6918

@jzahka

Description

@jzahka

Bug Report or Feature Request (mark with an x)

- [ ] bug report -> please search issues before submitting
- [ X ] feature request

Versions.

ngtools/webpack: 1.4.2

Repro steps.

Use AOT plugin with webpack, and write code that does not compile.

The log given by the failure.

Module not found: Error: Can't resolve './../../aot/my-app/src/app/app.module.ngfactory'

Desired functionality.

The above error message happens because AOT compilation fails and app.module.ngfactory is not created. The plugin should log AOT compilation errors to console.

Also my webpack build hangs and does not exit with an error when this happens. Unsure if that issue is specific to me, or a general issue that can be fixed in the plugin.

Mention any other details that might be useful.

My quick fix was to add a catch here and log the error to console.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentseverity2: inconvenient

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions