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

[compiler-sfc][typescript]normal <script> below <script setup> report error while use typescript #4395

Closed
klwfwdk opened this issue Aug 20, 2021 · 1 comment · Fixed by #4419

Comments

@klwfwdk
Copy link
Contributor

klwfwdk commented Aug 20, 2021

Version

3.2.4

Reproduction link

sfc-playground

Steps to reproduce

  1. first <script setup> then <script> works
  2. first <script lang="ts> then <script setup lang="ts"> works
  3. first <script setup lang="ts"> then <script lang="ts"> broken with error Cannot access '__default__' before initialization

What is expected?

works well without consider order

What is actually happening?

use lang="ts" and put the normal block below setup block has error

@klwfwdk klwfwdk changed the title [compiler-sfc][typescript][vue-]normal <script> below <script setup> report error while use typescript [compiler-sfc][typescript]normal <script> below <script setup> report error while use typescript Aug 20, 2021
@lidlanca
Copy link
Contributor

#4376

@posva posva closed this as completed Aug 20, 2021
yyx990803 pushed a commit that referenced this issue Aug 23, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Oct 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants