-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
feat(core): add the possibility of activating NestJS devtools #2568
feat(core): add the possibility of activating NestJS devtools #2568
Conversation
Hi, Thanks for the suggestion & PR. I haven't tried the NestJS devtools but it looks very nice. I would like to add support, but I'd rather find a way that does not require us to add a direct dependency and couple our config to the implementation if possible. From what I can see, the only thing preventing anyone from integrating the devtools is that we do not expose a way to modify the options passed to the Let's imagine that in future, the Nest team decide to add more options that can be passed to the I think a more general solution, which would cover this PR and other cases too, would be to add a second argument to the In this way, integration with the devtools would be trivial and require no other changes to core. |
Hi, in fact it's a better solution for maintaining the code over time. I made the change and update the "how to test" part |
Yes this is much neater, I like it. One final thing: I think I'd prefer to have the second argument be our own object that could potentially be extended in the future, like this: interface BootstrapOptions {
nestApplicationOptions: NestApplicationOptions;
}
interface BootstrapWorkerOptions {
...
} because based on long experience it is quite likely that we eventually think "oh wouldn't it be great if we could also configure this aspect of the bootstrap process", at which point we have an obvious place to do so. |
Yes of course, it's done |
3b6d6ab
into
vendure-ecommerce:minor
Thank you! |
Nest Devtools can be used without requiring the package as a core dependency. Relates to #2568
Description
Add the possibility of activating NestJS devtools in Vendure.
This will enable developers to analyse the bootstrap performance of their applications. This becomes very interesting when application have a large number of modules and plugins to find a bottleneck
Note
Activation is enabled via env vars. I am aware that it is not the best way, if you have any suggestions for doing it differently
How to test
packages/dev-server/index.ts
addENABLE_DEVTOOLS=true DB=postgres yarn start
Breaking changes
No
Screenshots
Checklist
📌 Always:
⚡ Most of the time: