You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please answer the following questions for yourself before submitting an issue.
I am running the latest version
I checked the documentation and found no answer
I checked to make sure that this issue has not already been filed
I'm reporting the issue to the correct repository
Current Behavior
In a monorepo, with 2 projects: a moleculer project and a helper project.
The moleculer project imports the helper project.
When the hot reload middleware is enabled, any file changes in the moleculer project causes high cpu usage because the hot relaod is stuck in circular dependency.
Expected Behavior
No circular dependency and normal hot reload.
Failure Information
Steps to Reproduce
Please provide detailed steps for reproducing the issue.
Create monorepo
Create project B
Create project A that imports moleculer and project B
Launch project A with hot reload
Change a file in project A and save.
Reproduce code snippet
Context
Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.
Moleculer version: 0.14.29
NodeJS version: v16
Operating System: Linux
Solution
Add option to hot reload middleware to ignore build directory of other monorepo projects (dist, build, out, etc)
Time if ignore /dist disabled: ✔ ServiceBroker with 43 service(s) started successfully in 6s
Time if ignore /dist enabled: ✔ ServiceBroker with 43 service(s) started successfully in 3s
Prerequisites
Please answer the following questions for yourself before submitting an issue.
Current Behavior
In a monorepo, with 2 projects: a moleculer project and a helper project.
The moleculer project imports the helper project.
When the hot reload middleware is enabled, any file changes in the moleculer project causes high cpu usage because the hot relaod is stuck in circular dependency.
Expected Behavior
No circular dependency and normal hot reload.
Failure Information
Steps to Reproduce
Please provide detailed steps for reproducing the issue.
Reproduce code snippet
Context
Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.
Solution
Add option to hot reload middleware to ignore build directory of other monorepo projects (
dist
,build
,out
, etc)Here is the line : https://github.com/moleculerjs/moleculer/blob/v0.14.29/src/middlewares/hot-reload.js#L241
Example with hardcoded value :
The text was updated successfully, but these errors were encountered: