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(compiler-sfc): fix that semi may be required when removing macro … #7812

Closed

Conversation

yangxiuxiu1115
Copy link
Contributor

@yangxiuxiu1115 yangxiuxiu1115 commented Mar 2, 2023

fixed #7805
<script setup> import { ref } from 'vue' console.log('test') const props = defineProps(['item']) (function(){})() </script>
I don't think the above situation needs to be handled because it contains syntax errors.

If there are more scenarios or better implementations, please communicate with me

@houd1ni
Copy link

houd1ni commented Mar 2, 2023

Hi! What do you mean by not need to be handled ? That code line is not the same as in the original issue. In the issue, it's perfectly valid and makes sense. I haven't dove deep into the code, yet hope, it fixes my original issue with ;(window as any).prop 🛩️

@yangxiuxiu1115
Copy link
Contributor Author

yangxiuxiu1115 commented Mar 2, 2023

Yes, your issue is effective. I mean that the following situation does not need to be dealt with.
As you said, the following situation is not the same as yours.

<script setup> 
import { ref } from 'vue'
console.log('test') 
const props = defineProps(['item']) 
(function(){})() 
</script>

sxzz added a commit that referenced this pull request Jun 10, 2023
yyx990803 pushed a commit that referenced this pull request Jul 12, 2023
@yyx990803
Copy link
Member

#8535 provides a more fundamental fix, but still thank you for the PR!

@yangxiuxiu1115 yangxiuxiu1115 deleted the fix/compiler-sfc-semi branch November 20, 2023 14:30
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.

Vue 3 SFC Compiler function call with semicolon bug.
3 participants