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

Error in a project using decorators if esbuild version is >= 0.18.0 #365

Closed
Leksat opened this issue Jun 15, 2023 · 4 comments · Fixed by #370
Closed

Error in a project using decorators if esbuild version is >= 0.18.0 #365

Leksat opened this issue Jun 15, 2023 · 4 comments · Fixed by #370
Labels

Comments

@Leksat
Copy link

Leksat commented Jun 15, 2023

Starting from v0.18.0 esbuild throws an error if TypeScript decorators are used in the project.

ERROR: Experimental decorators are not currently enabled

This is because esbuild now checks for experimentalDecorators: true in tsconfig (evanw/esbuild@6f2c029).

Originally it was reported as a bug to evanw/esbuild#3163
But it looks like rollup-plugin-esbuild just does not pass experimentalDecorators option to esbuild.

Possible solutions:

  • pass experimentalDecorators option to transform (the one we get from tsconfig? or maybe always true?)
  • restrict esbuild version to < 0.18.0
@Leksat
Copy link
Author

Leksat commented Jun 15, 2023

#366 provides one of the possible solutions.

@nielsvanvelzen
Copy link

I'm also affected by this issue. #366 seems like a good fix. It would be nice to see it merged into a release. @egoist could you take a look at #366 and possibly release a new version?

sxzz added a commit that referenced this issue Sep 20, 2023
sxzz added a commit that referenced this issue Sep 20, 2023
sxzz added a commit that referenced this issue Sep 20, 2023
closes #365, closes #366

Breaking changes
- `target` now defaults to `es2020`
- Required esbuild version should be 0.18 and above
sxzz added a commit that referenced this issue Sep 20, 2023
closes #365, closes #366

BREAKING CHANGE:
- `target` now defaults to `es2020`
- Required esbuild version should be 0.18 and above
@sxzz sxzz closed this as completed in #370 Sep 20, 2023
@github-actions
Copy link

🎉 This issue has been resolved in version 6.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@vmizg
Copy link

vmizg commented Sep 28, 2023

This still does not work with extended tsconfig. Created a new issue for that in #371.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants