Skip to content

custom-elements.json tag path incorrect on windows #216

@ajmchambers

Description

@ajmchambers

After running wca analyze \"src/**/*.js\" --outFile custom-elements.json

The result path is e.g.: "./src\\Component.js"

This seems to be due to this line here:

import { relative } from "path";

...

const path = fileName != null && config.cwd != null ? `./${relative(config.cwd, fileName)}` : undefined;

Changing it to this appears to fix it:

import { relative, sep, posix } from "path";

...

const path = fileName != null && config.cwd != null ? `./${relative(config.cwd, fileName).replaceAll(sep, posix.sep)}` : undefined;

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