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

Ng serve --watch must be stopped then started again when updating JSON files #12964

Closed
BradBorget opened this issue Nov 15, 2018 · 1 comment · Fixed by #13089
Closed

Ng serve --watch must be stopped then started again when updating JSON files #12964

BradBorget opened this issue Nov 15, 2018 · 1 comment · Fixed by #13089
Labels
area: ngtools/webpack freq1: low Only reported by a handful of users who observe it rarely severity3: broken type: bug/fix
Milestone

Comments

@BradBorget
Copy link

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

Node v10.13.0
npm v6.4.1
Angular CLI: 7.0.4
Angular: 7.0.3
Windows 10

Repro steps

I added the argument ""resolveJsonModule": true" to the tsconfig.ts file to allow JSON to come into the project.
Import * as data from JSON file (stored in the app folder of angular project)
console.log(data)
ng serve --watch
change the JSON file at all and make a change to one of the angular files
console.log(data) will return the same information as before.
Exit ng serve --watch
ng serve --watch
Works just as expected, returns the data properly.

The log given by the failure

No log given, just a problem with the JSON not updating whatsoever.

Desired functionality

Hopefully, the JSON will be able to be updated without having to exit and re-enter into the ng serve --watch.

Mention any other details that might be useful

Personal project, but I can push it to github if necessary.

@alan-agius4 alan-agius4 added type: bug/fix freq1: low Only reported by a handful of users who observe it rarely severity3: broken area: ngtools/webpack labels Nov 15, 2018
@ngbot ngbot bot added this to the Backlog milestone Nov 15, 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: ngtools/webpack freq1: low Only reported by a handful of users who observe it rarely severity3: broken type: bug/fix
Projects
None yet
2 participants