Skip to content

[plugin-vue] Can't use custom compiler #6587

Closed
@surmon-china

Description

Describe the bug

The compiler default value null results rawOptions.compiler never used.

let options: ResolvedOptions = {
isProduction: process.env.NODE_ENV === 'production',
...rawOptions,
include,
exclude,
customElement,
reactivityTransform,
root: process.cwd(),
sourceMap: true,
compiler: null as any // to be set in buildStart

Reproduction

b289b2d#diff-2b066c2eb45a74f1191f8796c6c76a93a7bc81417b11b8852e965aec86be2cc4

System Info

System:
    OS: macOS 12.1
    CPU: (8) x64 Apple M1
    Memory: 36.40 MB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 14.18.0 - /usr/local/bin/node
    Yarn: 1.22.4 - /usr/local/bin/yarn
    npm: 6.14.15 - /usr/local/bin/npm
  Browsers:
    Chrome: 97.0.4692.99
    Firefox Developer Edition: 97.0
    Safari: 15.2
  npmPackages:
    @vitejs/plugin-vue: ^2.0.1 => 2.0.1
    vite: ^2.7.13 => 2.7.13

Used Package Manager

yarn

Logs

"Failed to resolve vue/compiler-sfc.\n@vitejs/plugin-vue requires vue (>=3.2.13) or @vue/compiler-sfc to be present in the dependency tree."

Validations

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