nest-cli icon indicating copy to clipboard operation
nest-cli copied to clipboard

attempt at optionally enabling server reload for non-ts files

Open rbutera opened this issue 4 years ago • 2 comments

PR Checklist

Please check if your PR fulfills the following requirements:

  • [x] The commit message follows our guidelines: https://github.com/nestjs/nest/blob/master/CONTRIBUTING.md
  • [ ] Tests for the changes have been added (for bug fixes / features)
  • [ ] Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Other... Please describe:

What is the current behavior?

https://github.com/nestjs/nest-cli/issues/1140

Issue Number: 1140

What is the new behavior?

Added optional configuration:

compilerOptions.loadTimeout (number, milliseconds. 60sec by default) - time that the cli treats as the 'initial asset loading phase'. Any watched non-ts assets that are added or modified after this timeout will trigger a server reload.

compilerOptions.assets[i].reload (boolean, false by default) - set to true in order to enable server reloads for this asset if an addition or modification is detected after the initial asset loading phase.

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

Documentation to be updated

rbutera avatar Apr 21 '21 19:04 rbutera

This is a DRAFT pr

rbutera avatar Apr 21 '21 19:04 rbutera

can anyone help me with this?

rbutera avatar Apr 30 '21 14:04 rbutera

@kamilmysliwiec

Can you provide an insight on this? .gql files are completely ignored in the watch mode and there is no configuration option for allowing it that works. The nest-cli.json allows for specifying assets to watch, but when they're non ts files the server doesn't reload like with ts files. What can we do to change this to make development easier for working with graphql?

kwright02 avatar Dec 04 '22 05:12 kwright02

@kwright02 https://docs.nestjs.com/graphql/quick-start#schema-first

image

kamilmysliwiec avatar Dec 05 '22 08:12 kamilmysliwiec