Skip to content
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

angular and nestjs shared library esbuild vs nestjs build settings #23374

Open
1 of 4 tasks
robc123 opened this issue May 14, 2024 · 0 comments
Open
1 of 4 tasks

angular and nestjs shared library esbuild vs nestjs build settings #23374

robc123 opened this issue May 14, 2024 · 0 comments
Assignees
Labels
scope: angular Issues related to Angular support in Nx scope: node Issues related to Node, Express, NestJS support for Nx type: docs

Comments

@robc123
Copy link

robc123 commented May 14, 2024

Documentation issue

  • Reporting a typo
  • Reporting a documentation bug
  • Documentation improvement
  • Documentation feedback

Is there a specific documentation page you are reporting?

Enter the URL or documentation section here.

Additional context or description

Provide any additional details here as needed.

Before switch to esbuild, both angular and nestjs serve and build ok.
After switch angular project.json to esbuild then nestjs reports error
Cannot access EntityClassBO before initialization.
This BO is defined with nestJS class-transformer decorators e.g. @expose() and @type
Similarly DTO classes use class-validator decorators e.g. @isboolean()

Research on NestJs issues shows that esbuild cannot handle decorators and using tsconfig settings to suit this is not supported. NestJs issues have no idea of NX context of api app.

Ideally NX Documentation would show how to setup the nestjs api project.json so that it will independently build the shared library to revert to the same output as the previous method, this output location for api serve during debug would need to be independent of the output location for angular serve during debug done by esbuild(vite?).
API build would need to do the same, build the shared lib with webpack (I'm not 100% sure if that is how the lib was built by the old angular serve/ build executor setting: @angular-devkit/build-angular:browser)

Thanks
Rob

@FrozenPandaz FrozenPandaz added the scope: angular Issues related to Angular support in Nx label May 15, 2024
@FrozenPandaz FrozenPandaz added the scope: node Issues related to Node, Express, NestJS support for Nx label May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: angular Issues related to Angular support in Nx scope: node Issues related to Node, Express, NestJS support for Nx type: docs
Projects
None yet
Development

No branches or pull requests

3 participants