-
Notifications
You must be signed in to change notification settings - Fork 12k
feature(@ngtools/webpack): add an option to skip code generation. #3181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@hansl Forgive me, I am still trying to get my head around the intended usage of @ngtools/webpack for non-angular-cli projects - will this PR essentially make the loader from @ngtools/webpack a first class equivalent of ts-loader or awesome-typescript-loader? (Albeit those will having some additional features which are not necessarily required). Essentially I got @ngtools/webpack working well with building my hybrid ng1 and ng2 app with AoT, but ran into a strange runtime issue with Injectable when attempting run the code in JIT mode via my dev server. I was attempting to use @ngtools/webpack without using the AoTPlugin (in development, I was of course using it for the prod build). I tracked the issue with that down the decorator metadata not being emitted by the backup ts program you create in such cases where the plugin is not available (https://github.com/angular/angular-cli/blob/master/packages/webpack/src/loader.ts#L162). When attempting to research whether or not to submit that as an issue, I found this PR. I was naturally hoping to use the same tooling across dev, testing and prod (i.e. not have to use awesome-typescript-loader only for dev), would you recommend I simply wait for this PR to land, or is the best way still to use awesome-typescript-loader? Thanks for all your hard work! |
@JamesHenry The Webpack AoT plugin already acts as a replacement for ATL and TS-Loader. With this PR it allows you to use JIT compiling for faster compile times. As such, inside the CLI it will replace ATL entirely. This PR will allow you to use the same plugin and loader for both development (with JIT) and production (with AoT). |
Perfect! Thanks for getting back to me so quickly. Are there any outstanding tasks ahead of merging? With this being a nested subdirectory, is there a way to easily npm install the WIP from this PR branch? |
Not easily. Just wait for the release :) It will be soon after this lands. |
Ha fair enough! Thanks for the help |
faf16e2
to
d80f57e
Compare
99aeeee
to
9db998b
Compare
…evel refactor API
449aa32
to
0765308
Compare
0765308
to
63550b3
Compare
I'm going to submit this as I need to work on other things. As far as I can tell, this is ready and at least as feature complete as the current master. We'll address bugs before the next release. Cheers! |
Thanks! As in the next release of the CLI, or @ngtools/webpack itself? |
We release both at the same time, so yes. ;) |
…gular#3181) Also use that option to replace awesome-typescript-loader.
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Fix #3072