How do I get webpack to include modules under /packages in the bundle? #1667
-
|
I'm elaborating the issue I'm having in this SO thread: https://stackoverflow.com/questions/73294477/ But to sum it up, when having a non-next project, like a nestjs project and trying to build up one of the applications for development serving or for production, it doesn't include/work with the packages under /packages. Building all the packages as part of a separate process or a parallel process isn't a viable development experience, the equivalent would be if you make a change to the UI package and you have to cancel your dev. server and then rebuild the UI package and then serve the app again. Is there a way or an example of a nestjs app using a package? It works with VITE + SWC but then vite rebuilds the application for every request causing schema duplicates in GQL and crashing the server. Repository where this can be reproduced/played with: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
|
As a thought experiment, how would you imagine doing this in the situation where this was a stand-alone The way node modules and workspaces interact is exactly the same. Now, it's almost always possible to subvert the boundaries that are intended to create isolation at module boundaries, but that will require a seemingly magical incantation particular to every project and tech stack—and is entirely separate from Turborepo. This question is far-better-suited for a nestjs/Webpack forum. |
Beta Was this translation helpful? Give feedback.
As a thought experiment, how would you imagine doing this in the situation where this was a stand-alone
npmmodule you needed to update? Exactly as you described: pulling down the dev server, running the install, and then standing the server back up.The way node modules and workspaces interact is exactly the same.
Now, it's almost always possible to subvert the boundaries that are intended to create isolation at module boundaries, but that will require a seemingly magical incantation particular to every project and tech stack—and is entirely separate from Turborepo.
This question is far-better-suited for a nestjs/Webpack forum.