Javascriptservices: Disabling Angular AOT

Created on 12 Sep 2017  路  2Comments  路  Source: aspnet/JavaScriptServices

Hi JSS,

Thank you for adding AOT compilation, it's a handy feature to have 馃憤
Unfortunately we are dependant on 3rd-party Angular modules that do not support AOT yet.
Is there a way of temporarily disabling the AOT compilation for the publishing of the template?

Thanks 馃惐

Most helpful comment

Yes. In webpack.config.js:

  • Change the rule for .ts so it never uses '@ngtools/webpack', i.e., remove the conditional expression and always use the isDevBuild part of the expression.
  • Remove the use of AotPlugin from the array of plugins used in production builds (this appears in both client and server bundle configs)

All 2 comments

Yes. In webpack.config.js:

  • Change the rule for .ts so it never uses '@ngtools/webpack', i.e., remove the conditional expression and always use the isDevBuild part of the expression.
  • Remove the use of AotPlugin from the array of plugins used in production builds (this appears in both client and server bundle configs)

Worked, thank you!

Was this page helpful?
0 / 5 - 0 ratings