-
Notifications
You must be signed in to change notification settings - Fork 399
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
Strange build of a monorepo projects. #533
Comments
Please, provide a minimal repository which reproduces your issue. |
I see that you disabled webpack in the |
I do not need one file. I would like to do what the "tsc" compiler, only with exact paths for libraries. |
What's the reason? |
more convenient debugging and to use "instanceof" between applications relative to the library, it should be imported from one place. |
You can still use
If you plan to publish any of these libraries as, for instance, NPM package, you shouldn't use Nest CLI monorepo but rather lerna or yarn workspaces. |
Thanks for your reply. He conducted a small experiment and posted it in the repository "https://github.com/fenixphp/nest-cli-issues-533". If we consider the situation in which we have 10 microservices and 10 libraries, then in the end we will get 100 copies of these same libraries. I believe that this is incorrect work of the build, but this is just my opinion. |
This is expected behavior of the current configuration in which
As I said, that's why you should use webpack. If you are willing to publish these libraries to NPM and access them independently from various repositories (e.g. when you have several micro services in different repositories), you should use either lerna or yarn workspaces instead of Nest CLI monorepo. The philosophy behind Nest CLI monorepo is different (it assumes that all shared libraries will exist in one repository, won't be published to any registry, and will be bundled together with the app). |
I'm submitting a...
Current behavior
If I run the "nest build" and "nest build cli"
Expected behavior
Expected something similar to this:
Minimal reproduction of the problem with instructions
The project structure was generated by "nest-cli" 2 applications and 3 libraries.
1 library (database) was connected to both applications.
Environment
The text was updated successfully, but these errors were encountered: