Skip to content

Reactivity Transform: Fails to transform $ref() when used on an export #5298

@LinusBorg

Description

@LinusBorg

Version

3.2.27

Reproduction link

sfc.vuejs.org/

Steps to reproduce

Check out the PLayground. it fails with $ref is not defined

The Test.ts file in the playground has instructions for a workaround, demonstrating the transform only fails when used on an export

What is expected?

$ref() is being transformed, and App.vue succeeds in importing and using the export.

What is actually happening?

$ref() is left in the code untransformed, leading to a ReferenceError at runtime.

Found by a user and reported here originally: vuejs/rfcs#369 (reply in thread)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions