Skip to content

Provide helpful error when using lang="ts" without a preprocessor #585

Closed
@Rich-Harris

Description

@Rich-Harris

Describe the problem

see e.g. sveltejs/kit#8811. If a developer adds lang="ts" to a component without the relevant preprocessor, they'll get 'unexpected token' errors.

Describe the proposed solution

This is probably a common enough case that we could intercept the error and say something like 'you should add preprocessor: vitePreprocess()' or whatever

Alternatives considered

continue as presently

Importance

nice to have

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesttriageAwaiting triage by a project member

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions