Skip to content

fix(optimizer): enable experimentalDecorators by default#13981

Merged
bluwy merged 1 commit intovitejs:mainfrom
sapphi-red:fix/optimizer-enable-experimental-decorators-by-default
Jul 29, 2023
Merged

fix(optimizer): enable experimentalDecorators by default#13981
bluwy merged 1 commit intovitejs:mainfrom
sapphi-red:fix/optimizer-enable-experimental-decorators-by-default

Conversation

@sapphi-red
Copy link
Copy Markdown
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
@bolt-new-by-stackblitz
Copy link
Copy Markdown

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

@sapphi-red sapphi-red requested review from bluwy and patak-cat July 29, 2023 07:33
Copy link
Copy Markdown
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
@sapphi-red sapphi-red deleted the fix/optimizer-enable-experimental-decorators-by-default branch July 31, 2023 09:44
@Sombran00
Copy link
Copy Markdown

.l

@labidiaymen
Copy link
Copy Markdown

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