Skip to content

Including JITCompiler for HTML Compiler breaks with AOT #23

@Mattnmoore

Description

@Mattnmoore

When I try to load the HTML Compiler component on my production build, I get the following error in console.log

 Error: Angular JIT compilation failed: '@angular/compiler' not loaded!
  - JIT compilation is discouraged for production use-cases! Consider AOT mode instead.
  - Did you bootstrap using '@angular/platform-browser-dynamic' or '@angular/platform-server'?
  - Alternatively provide the compiler with 'import "@angular/compiler";' before bootstrapping.

Do you know of a workaround for using this component with AOT and the build optimizer? I tried importing @angular.compiler at the top of main.ts and that didn't fix the issue.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions