Support Angular CLI-based projects
DanielSchaffer opened this issue · 3 comments
- Angular has its own differential loading solution that uses a different approach
- It does not use
HtmlWebpackPlugin
, but has its own "index" page generating logic - Angular's diff loading can be disabled by setting
browserslist
to>5%
and setting thetsconfig
target toes6
HtmlWebpackPlugin
can be used with the Angular CLI by pointing its "index" configuration to an empty HTML file (e.g.index-placeholder.html
), and then addingHtmlWebpackPlugin
using a custom webpack config- Is it possible to use a plugin to accomplish these workarounds? Could make sense as a separate project
- Is it possible to hook in to Angular's index page generator the same way this plugin does with
HtmlWebpackPlugin
?
I created my own builder and after trying different webpack configurations I managed to adopt this plugin in a custom webpack configuration and the configuration that the angular cli has by default, and basically I achieved it by removing the plugins that angular generated error and adding HTMLWebpackPlugin
Yeah, this is definitely possible to do with https://github.com/just-jeb/angular-builders/tree/master/packages/custom-webpack - I don't know that there are any changes required for this plugin to support it, but I would like add a working example and instructions to include in the documentation.
I'm going to close this - From what I've seen, it's not very straightforward to prevent Angular from doing its own differential loading. I don't think there's a huge difference in value between Angular's implementation and this one, and any ongoing Angular support from this plugin would likely be difficult and time consuming to accomplish, with the end result being brittle at best, especially in light of Angular's efforts to be moving away from Webpack toward Bazel.
The existing Angular support will be deprecated in v3.0.0, and removed in v4.0.0.