-
-
Notifications
You must be signed in to change notification settings - Fork 9k
Closed
Labels
❗ p4-importantPriority 4: this fixes bugs that violate documented behavior, or significantly improves perf.Priority 4: this fixes bugs that violate documented behavior, or significantly improves perf.🐞 bugSomething isn't workingSomething isn't workinghas workaroundA workaround has been found to avoid the problemA workaround has been found to avoid the problemscope: compiler
Description
Version
3.0.4
Reproduction link
https://github.com/leopiccionia/vue-script-setup-emit-repro
Steps to reproduce
Just run the repro, with npm run dev.
What is expected?
Compiler should generate valid code.
What is actually happening?
Code fails with syntax error.
The problem is in this line from output:
import { , ref } from '/@modules/vue.js'The preceding comma is not valid in this place of import statement.
A workaround is changing the order of imports, so that defineEmit and defineProps are trailing.
I'm not sure if this is a Vite-specific error. I can move the issue, if needed.
Metadata
Metadata
Assignees
Labels
❗ p4-importantPriority 4: this fixes bugs that violate documented behavior, or significantly improves perf.Priority 4: this fixes bugs that violate documented behavior, or significantly improves perf.🐞 bugSomething isn't workingSomething isn't workinghas workaroundA workaround has been found to avoid the problemA workaround has been found to avoid the problemscope: compiler