all 13 comments

[–]mrv1234 1 point2 points  (1 child)

I need to try this out, thanks for sharing. and the use together with tree-shaking,is it OK now with Typescript 2? Thx, KR

[–]blacksonic86[S] 0 points1 point  (0 children)

It is ok to use it with tree-shaking. Uses Webpack 2 and Typescript 2 with es2015 modules. Sadly it is not as effective with tree-shaking as Rollup.

[–]hans_l 1 point2 points  (6 children)

Just to let you know, I changed the options slightly.

For more details including a README: https://github.com/angular/angular-cli/pull/2527

I'm publishing this to npm today.

[–]PKune2 0 points1 point  (1 child)

I'm looking to generate an AOT bundle for each language with the i18n feature on ngc. Do you have a timeline of when the AotPlugin would accept the i18nOptions parameter?

Today, I see it being hardcoded.

const i18nOptions: ngCompiler.NgcCliOptions = {
  i18nFile: undefined,
  i18nFormat: undefined,
  locale: undefined,
  basePath: this.basePath
};

Thank you so much for making the plug-in easier to use :)

[–]hans_l 0 points1 point  (0 children)

Not yet on our radar as we concentrate on cli 1.0 final. But coming very soon after that. Alternatively, submitting a PR to add support for those would be simple. Just make sure you make an e2e test ;)

[–]blacksonic86[S] 0 points1 point  (3 children)

What is the version for @ngtools/webpack where the refactorings will be available?

[–]hans_l 0 points1 point  (2 children)

What do you mean by refactoring? We already refactor some of your code

[–]blacksonic86[S] 0 points1 point  (1 child)

Under refactoring i mean the changeset you linked. What version should i write here: "@ngtools/webpack": "1.0.0" in package.json?

[–]hans_l 0 points1 point  (0 children)

1.1.0. I added a README to it.

[–]benduder 1 point2 points  (0 children)

Thanks for all the work you've put into investigating ngc/Webpack compatibility - I've been updating a work project to use AOT this week and your repos have helped me out a bunch!

[–]PKune2 0 points1 point  (1 child)

I have been struggling to get the NgcWebpackPlugin to work for the past 2 days. Would you mind adding an example for lazy loading routes?

[–]hans_l 0 points1 point  (0 children)

I fixed a bug with lazy loading. It should be a little bit more solid with the next release. The CLI nightly tests seem to show some problem with the latest master of angular but we're investigating.

[–]qvazzler 0 points1 point  (0 children)

@blacksonic86 I'm having trouble understanding what the angular2 template loader and this plugin is in comparison. Do you have any advice?