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

SWC plugin (improve Vite / Nest.js support) #185

Closed
wants to merge 2 commits into from
Closed

Conversation

guyca
Copy link
Collaborator

@guyca guyca commented Oct 24, 2024

This PR will add an SWC plugin which can be used instead of the Babel plugin in Vite or Nest.js apps.

Background

Vite and Nest.js are currently two of the most popular front end frameworks. Both promote using SWC as the default transpiler as it boasts much better performance compared to the Babel.

POC

  • Write a visitor that logs the name of each node it visited
  • Test locally (publish with yalc)

Todo

  • Initial SWC plugin scaffolding
  • Add testing infra
  • Fix build in CI
  • Implement a failing test for @Provides() –> @Provides({name: 'foo'})
  • Transform @Provides()
  • Transform provider arguments
  • Publish alpha
  • Transform @Inject() foo!: Foo; –> @Inject('foo') foo!: Foo;
  • Publish stable
  • Update installation docs

fixes #162 (at some point 😉 )

@guyca guyca changed the title SWC plugin (improve Vite SWC plugin (improve Vite / Nest.js support) Oct 24, 2024
@guyca
Copy link
Collaborator Author

guyca commented Oct 25, 2024

Closing in favor of #186

@guyca guyca closed this Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Usage without babel
1 participant