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

fix(optimizer): enable experimentalDecorators by default #13981

Conversation

sapphi-red
Copy link
Member

Description

fixes #13955
refs #13805

This PR enables experimentalDecorators by default for the optimizer.

#13955 wasn't working because @conectate/ct-button resolves to a TS file using experimental decorators. Even if I change the include field of tsconfig.json in the project directory, it didn't work. Setting experimentalDecorators: true by depOptimizer.esbuildOptions.tsconfigRaw in the Vite config worked. I guess it's similar to the scanner (#13805 (comment)).

Additional context


What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Before submitting the PR, please make sure you do the following

  • Read the Contributing Guidelines.
  • Read the Pull Request Guidelines and follow the PR Title Convention.
  • Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
  • Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
  • Ideally, include relevant tests that fail without this PR but pass with it.

@sapphi-red sapphi-red added p3-minor-bug An edge case that only affects very specific usage (priority) regression The issue only appears after a new release labels Jul 29, 2023
@stackblitz
Copy link

stackblitz bot commented Jul 29, 2023

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

Copy link
Member

@bluwy bluwy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching this!

@bluwy bluwy merged commit f8a5ffc into vitejs:main Jul 29, 2023
12 checks passed
@sapphi-red sapphi-red deleted the fix/optimizer-enable-experimental-decorators-by-default branch July 31, 2023 09:44
@Sombran00
Copy link

.l

@labidiaymen
Copy link

I'm using the latest version of Astro v4 with lit element. I updated all the deps ..
but still get the decorator error
image

Thanks in advance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p3-minor-bug An edge case that only affects very specific usage (priority) regression The issue only appears after a new release
Projects
None yet
5 participants