error: "Missing semicolon" when using vue v-on object syntax
Vue version
3.2.39
Link to minimal reproduction
Steps to reproduce
Follow the link, slightly change js code to trigger demo recompilation. You will see SyntaxError: Missing semicolon.
What is expected?
Success vue file compilation.
What is actually happening?
SyntaxError: Missing semicolon. (1:27) at Parser._raise (https://unpkg.com/@vue/compiler-sfc@3.2.39/dist/compiler-sfc.esm-browser.js:1347:17) at Parser.raiseWithData (https://unpkg.com/@vue/compiler-sfc@3.2.39/dist/compiler-sfc.esm-browser.js:1340:17) at Parser.raise (https://unpkg.com/@vue/compiler-sfc@3.2.39/dist/compiler-sfc.esm-browser.js:1301:17) at Parser.semicolon (https://unpkg.com/@vue/compiler-sfc@3.2.39/dist/compiler-sfc.esm-browser.js:4356:10) at Parser.parseExpressionStatement (https://unpkg.com/@vue/compiler-sfc@3.2.39/dist/compiler-sfc.esm-browser.js:14705:10) at Parser.parseExpressionStatement (https://unpkg.com/@vue/compiler-sfc@3.2.39/dist/compiler-sfc.esm-browser.js:10434:26) at Parser.parseStatementContent (https://unpkg.com/@vue/compiler-sfc@3.2.39/dist/compiler-sfc.esm-browser.js:14296:19) at Parser.parseStatementContent (https://unpkg.com/@vue/compiler-sfc@3.2.39/dist/compiler-sfc.esm-browser.js:10334:18) at Parser.parseStatement (https://unpkg.com/@vue/compiler-sfc@3.2.39/dist/compiler-sfc.esm-browser.js:14158:17) at Parser.parseLabeledStatement (https://unpkg.com/@vue/compiler-sfc@3.2.39/dist/compiler-sfc.esm-browser.js:14697:22)
System Info
No response
Any additional comments?
The error doesn't appear if comment out import declaration line or delete one property from binden (v-on) object.
Same issue happened to me on nuxt3.rc10 https://github.com/nuxt/framework/pull/7374
https://github.com/vuejs/core/pull/6652 Seems to fix this