Skip to content

includePaths should normalize path separator #42

@ljani

Description

@ljani

I'm on Windows and tried to configure includePaths to only include ["./src"], but none of the files match.

If I console.log(filename, path.resolve(includePath)) here, I get the following output:

C:/devel/myblog/src/lib/components/Header.svelte C:\devel\myblog\src

Obviously filename.indexOf will fail. Thus either filename should be normalized to use backslashes or the result from path.resolve should be changed to use forward slashes.

PS. maybe consider breaking the forEach, when the first match is found? Also should this if be an else?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions