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

Vite as builder for NestJS #10721

Closed
1 task done
andylacko opened this issue Dec 14, 2022 · 3 comments
Closed
1 task done

Vite as builder for NestJS #10721

andylacko opened this issue Dec 14, 2022 · 3 comments
Labels
needs triage This issue has not been looked into type: enhancement 🐺

Comments

@andylacko
Copy link

Is there an existing issue that is already proposing this?

  • I have searched the existing issues

Is your feature request related to a problem? Please describe it

Currently NestJS run on CommonJS modules, there is no way to run ESM with treeshaking and using VITE as build tool. Found https://blog.logrocket.com/getting-started-with-nestjs-vite-esbuild/ , or https://github.com/unlight/nest-vite-node-starter, but it seems like it would break after first update.

Describe the solution you'd like

It would be really nice to migrate from webpack. Maybe there is something working for decorators like https://github.com/anatine/esbuildnx .

Teachability, documentation, adoption, migration strategy

Maybe it should work like you choose in config, you want to use vite

What is the motivation / use case for changing the behavior?

Today JS/TS world has moved to interesting tools like esbuild and Vite and esm. I lack those improvements in NestJS

@andylacko andylacko added needs triage This issue has not been looked into type: enhancement 🐺 labels Dec 14, 2022
@micalevisk
Copy link
Member

micalevisk commented Dec 14, 2022

There is a closed Issue discussing about esbuild and ESM stuff

There is also a WIP PR to support ESM.

Not sure if you've seen them already.

@Tony133
Copy link
Contributor

Tony133 commented Dec 14, 2022

Here you find the PR (WIP) :#8736, with discussion of ESM and CJS

Here: #8669, you can also find the answer for Vite support for NestJS, already been discussed in the past.

@kamilmysliwiec
Copy link
Member

esbuild doesn't support decorators

@nestjs nestjs locked and limited conversation to collaborators Dec 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs triage This issue has not been looked into type: enhancement 🐺
Projects
None yet
Development

No branches or pull requests

4 participants