Skip to content
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

Hybrid/ngUpdate build does not output a changed chunk when updating AngularJS javascript sources #13076

Closed
ManuelRauber opened this issue Nov 28, 2018 · 2 comments · Fixed by #13089
Labels
area: devkit/build-webpack freq1: low Only reported by a handful of users who observe it rarely severity3: broken type: bug/fix
Milestone

Comments

@ManuelRauber
Copy link

ManuelRauber commented Nov 28, 2018

Bug Report or Feature Request (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request

Command (mark with an x)

- [ ] new
- [ ] build
- [x] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc

Versions

Windows 7, Node 10 LTS, Angular 7.1.0

Failure Description

I've an Angular project, which is currently upgraded using NgUpgrade from an older AngularJS project. Yesterday, I've updated from Angular 6 to Angular 7 using ng update and started the project as usual with ng serve.

However, I've noticed a strange behaviour with the update. When I've used Angular 6 and I changed some code within the JS-Files from the AngularJS project, the CLI recompiled the app and outputted one changed chunk.
With Angular (CLI) 7, the CLI recompiles after a change as well, but does not output a changed chunk, so the changed code is not there after the live reload. Source Maps are also broken at this point. However, if I change code within a template file of the AngularJS app, then a new chunk will be generated.

In both versions it worked perfectly when changing TypeScript sources (but still, won't update the JS sources within the changed chunk)

Desired functionality

It should work like it did before, so whenever I change code within the AngularJS code base, the recompilation should output a changed chunk with the new code.

I've also noticed, that if I remove allowJs from my tsconfig.app.json, it works as expected with Angular 7.

Package Versions:

Angular (CLI/ Compiler CLI, Language Service etc.): 7.1.0
@angular-devkit/build-angular: 0.11.0

@alan-agius4
Copy link
Collaborator

alan-agius4 commented Nov 28, 2018

This might be somewhat also related to #12964

This can be simply reproducible, but adding allowJs and a single JS file.

@alan-agius4 alan-agius4 added freq1: low Only reported by a handful of users who observe it rarely severity3: broken area: devkit/build-webpack labels Nov 28, 2018
@ngbot ngbot bot added this to the needsTriage milestone Nov 28, 2018
@ngbot ngbot bot modified the milestones: needsTriage, Backlog Nov 28, 2018
vikerman pushed a commit that referenced this issue Nov 30, 2018
…s` or `resolveJsonModule` (#13089)

* fix(@ngtools/webpack): files are not being updated when using `allowJs` or `resolveJsonModule`

Fixes #13076 and Fixes #12964

* test: add tests for allowJs and resolveJsonModule in watch mode

* test: improve tests for `allowJs`

When not using `allowJs` js files are not processed by the tsc compiler, but still processed by webpack.

So a correct test should be to check that the JS is transpiled down to ES5 syntax.
vikerman pushed a commit that referenced this issue Nov 30, 2018
…s` or `resolveJsonModule` (#13089)

* fix(@ngtools/webpack): files are not being updated when using `allowJs` or `resolveJsonModule`

Fixes #13076 and Fixes #12964

* test: add tests for allowJs and resolveJsonModule in watch mode

* test: improve tests for `allowJs`

When not using `allowJs` js files are not processed by the tsc compiler, but still processed by webpack.

So a correct test should be to check that the JS is transpiled down to ES5 syntax.
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 8, 2019
ikjelle pushed a commit to ikjelle/angular-cli that referenced this issue Mar 26, 2024
…s` or `resolveJsonModule` (angular#13089)

* fix(@ngtools/webpack): files are not being updated when using `allowJs` or `resolveJsonModule`

Fixes angular#13076 and Fixes angular#12964

* test: add tests for allowJs and resolveJsonModule in watch mode

* test: improve tests for `allowJs`

When not using `allowJs` js files are not processed by the tsc compiler, but still processed by webpack.

So a correct test should be to check that the JS is transpiled down to ES5 syntax.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: devkit/build-webpack freq1: low Only reported by a handful of users who observe it rarely severity3: broken type: bug/fix
Projects
None yet
2 participants