Skip to content

Error after updating parent application to Vue@3.3.x #110

@benjag

Description

@benjag

Describe the bug

When updating my application using vue-live I noticed that the latest release of Vue (3.3.2) seems to be breaking the vue-live functionality.

Reproduction

https://github.com/benjag/vue-live-issue

Steps to reproduce

git clone git@github.com:benjag/vue-live-issue.git
cd vue-live-issue
npm i
npm run dev

What is expected?

The VueLive component should render the provided code

What is happening?

The code is not rendered and an error is being thrown.

Screenshot 2023-05-17 at 12 54 35 PM

Additional comments

Stacktrace provided by the built-in @error handler

Error on first example TypeError: Cannot read properties of undefined (reading 'length')
    at new MagicString (compiler-sfc.esm-browser.js:45940:37)
    at new ScriptCompileContext (compiler-sfc.esm-browser.js:47527:14)
    at compileScript (compiler-sfc.esm-browser.js:49471:15)
    at compileTemplateForEval (vue-inbrowser-compiler-utils.esm.js:162:30)
    at compileVueCodeForEvalFunction (vue-inbrowser-compiler-sucrase.esm.js:265:9)
    at Proxy.renderComponent (vue-live.mjs:306:19)
    at Proxy.created (vue-live.mjs:271:10)
    at callWithErrorHandling (runtime-core.esm-bundler.js:158:32)
    at callWithAsyncErrorHandling (runtime-core.esm-bundler.js:166:17)
    at callHook (runtime-core.esm-bundler.js:3509:3)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingreleased

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions