Skip to content

support template compilerOptions for sfc with script setup #1838

@b2nil

Description

@b2nil

What problem does this feature solve?

Configuring compilerOptions with the latest version 16.2.0 does not work for sfc with script setup, as the function resolveScript does not yet pass compilerOptions to compileScript.

resolved = compileScript(descriptor, {
id: scopeId,
isProd,
inlineTemplate: enableInline,
babelParserPlugins: options.babelParserPlugins,
templateOptions: {
compiler,
ssr: isServer,
transformAssetUrls: options.transformAssetUrls || true,
},
})

What does the proposed API look like?

Passing compilerOptions to compileScript's templateOptions so that resolved code of sfc with script setup honors the compilerOptions provided in vue-loader configuration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions