Skip to content

about automatic updates #15098

@rhydian0x

Description

@rhydian0x

Is there an existing issue that is already proposing this?

  • I have searched the existing issues

Is your feature request related to a problem? Please describe it

When I organize a NestJS app and a NestJS lib as a monorepo (each with its own tsconfig and package.json, compiled independently), I notice that after importing the lib into the app, modifying class methods in *.service files within the lib does not trigger the NestJS app to recompile automatically. Even though I'm running tsc --watch in the lib, the NestJS app still doesn't recompile — it's as if the app doesn't detect changes in the lib's dist output.

However, if I modify other types of variables in the lib (such as const or enum), the app does recompile. I suspect this might be because Nest services or modules are instantiated only once?

Could you please provide some suggestions or solutions to address this issue?

Describe the solution you'd like

When I organize a NestJS app and a NestJS lib as a monorepo (each with its own tsconfig and package.json, compiled independently), I notice that after importing the lib into the app, modifying class methods in *.service files within the lib does not trigger the NestJS app to recompile automatically. Even though I'm running tsc --watch in the lib, the NestJS app still doesn't recompile — it's as if the app doesn't detect changes in the lib's dist output.

However, if I modify other types of variables in the lib (such as const or enum), the app does recompile. I suspect this might be because Nest services or modules are instantiated only once?

Could you please provide some suggestions or solutions to address this issue?

Teachability, documentation, adoption, migration strategy

When I organize a NestJS app and a NestJS lib as a monorepo (each with its own tsconfig and package.json, compiled independently), I notice that after importing the lib into the app, modifying class methods in *.service files within the lib does not trigger the NestJS app to recompile automatically. Even though I'm running tsc --watch in the lib, the NestJS app still doesn't recompile — it's as if the app doesn't detect changes in the lib's dist output.

However, if I modify other types of variables in the lib (such as const or enum), the app does recompile. I suspect this might be because Nest services or modules are instantiated only once?

Could you please provide some suggestions or solutions to address this issue?

What is the motivation / use case for changing the behavior?

When I organize a NestJS app and a NestJS lib as a monorepo (each with its own tsconfig and package.json, compiled independently), I notice that after importing the lib into the app, modifying class methods in *.service files within the lib does not trigger the NestJS app to recompile automatically. Even though I'm running tsc --watch in the lib, the NestJS app still doesn't recompile — it's as if the app doesn't detect changes in the lib's dist output.

However, if I modify other types of variables in the lib (such as const or enum), the app does recompile. I suspect this might be because Nest services or modules are instantiated only once?

Could you please provide some suggestions or solutions to address this issue?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions