Skip to content

compiler-sfc not compatible with prettier v3 #13052

Closed
@kingyue737

Description

Version

2.7.14

Reproduction link

I think it's not necessary as it's obvious in source code

Steps to reproduce

Install prettier v3 in a project depending on vue/compiler-sfc v2

What is expected?

No error

What is actually happening?

Fail in compiling template.

I found compiler-sfc tried to format code with API of prettier but format of Prettier becomes async in v3 and it returns a Promise instead of string.

code = require('prettier').format(code, {

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