Skip to content

import without new line at the top of setup script + defineProps causes error #4764

@loogn

Description

@loogn

Version

3.2.19

Reproduction link

sfc.vuejs.org/

Steps to reproduce

  • open the repro

What is expected?

const props = __props;
import { ref } from 'vue'

What is actually happening?

编译成的代码:
const props = __propsimport { ref } from 'vue'


第一句import那里如果不换号就会出错,vue文件会编译成 ......props=propsimport { reactive,ref} ......,应该是少一个";"
如果import那句换行的话,就不会出错了

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