Skip to content

load_config fails in windows #396

Description

@Rich-Harris

according to https://twitter.com/whiteadderPT/status/1362877103218323459. i think the fix is here:

export async function load_config({ cwd = process.cwd() } = {}) {
const config_file = join(cwd, 'svelte.config.cjs');
const config = await import(config_file);
const validated = validate_config(config.default);
// TODO check all the `files` exist when the config is loaded?
// TODO check that `target` is present in the provided template
return validated;
}

It should probably be await import(pathToFileURL(config_file).href);

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