Skip to content

support svelte.config.ts #1133

@dominikg

Description

@dominikg

Describe the problem

If users opt to create a project with typescript enabled, they still get a svelte.config.js file generated by sv because we load the config via import. Runtimes like deno and bun, and more recently nodejs allow importing local .ts files now, so users expecting this to work get confused, because svelte.config.ts is ignored and default config is used instead.

Describe the proposed solution

detect and try to import svelte.config.ts if it works, then use it. if it fails, tell the user to bring a runtime that supports it or change to svelte.config.js

Alternatives considered

wait longer until it is supported unflagged in node/available in webcontainers (sveltelab, kit tutorial, stackblitz ...)

Importance

would make my life easier

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions