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

NestJs need to have es6 in tsconfig target #1002

Closed
3 of 4 tasks
Need-To-Learn opened this issue Jan 16, 2019 · 5 comments · Fixed by #2518
Closed
3 of 4 tasks

NestJs need to have es6 in tsconfig target #1002

Need-To-Learn opened this issue Jan 16, 2019 · 5 comments · Fixed by #2518
Assignees
Labels
outdated scope: node Issues related to Node, Express, NestJS support for Nx type: bug

Comments

@Need-To-Learn
Copy link

Prerequisites

Please answer the following questions for yourself before submitting an issue.
YOU MAY DELETE THE PREREQUISITES SECTION.

  • 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 (not related to Angular, AngularCLI or any dependency)

Expected Behavior

I merged my api repository using nest to my nrwl repository with the 7.3 version.
The ng serve nestjs-project is suppose to correctly run the API

Current Behavior

Nest wasn't able to handle request when using Nest middleware (infinite loading).
I found out the issue : nestjs/nest#266.
Nestjs need to have tsconfig target set to es6, but by default the tsconfig generated by nrwl inherit from the global tsconfig (es5).

Other

I think it would be nice to override nrwl default tsconfig with the default nestjs tsconfig options when generating a new nestjs project

@FrozenPandaz FrozenPandaz added type: bug community This is a good first issue for contributing labels Jan 16, 2019
@Toxicable
Copy link

Just to add onto this.
For Nodejs applications; since you control the version of target runtime (Nodejs), you have full control over what language features are available, therefore there's no advantage to downleveling. I've also observed performance improvements in some very specific CPU intensive workloads by not downleveling.
With the above in mind I personally always use 'esnext' for server applications

@mehrad-rafigh
Copy link
Contributor

mehrad-rafigh commented Aug 30, 2019

Hey guys. I opened a PR #1770
Is it, what you party people are looking for? If so, cool! If not, what needs to be changed?

I created a brand new nest app with the nest cli and compared the tsconfig
After my patch, there won't be much difference.

@Toxicable I would recommend sticking to the target version nestjs uses. At the time being it is es2017

@Need-To-Learn
Copy link
Author

@mehrad-rafigh Hi, that's exactly what I was looking for :)
I didn't test it yet but reading the code, it looks good !

Plus I agree to the fact that we should stick to nestjs' es version.

@vsavkin vsavkin added scope: node Issues related to Node, Express, NestJS support for Nx and removed community This is a good first issue for contributing labels Dec 4, 2019
@vsavkin
Copy link
Member

vsavkin commented Dec 4, 2019

Folks. Is it still an issue?

@github-actions
Copy link

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated scope: node Issues related to Node, Express, NestJS support for Nx type: bug
Projects
None yet
6 participants