Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ajmchambers opened this issue Jun 1, 2021 · 2 comments · May be fixed by #217
Open

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

ajmchambers opened this issue Jun 1, 2021 · 2 comments · May be fixed by #217

Comments

@ajmchambers
Copy link

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;
@rallets
Copy link

rallets commented Oct 27, 2021

I have the same problem, a separator mismatch between Mac and Windows.
Very annoying that every time we get a different file.
Someone can take a look to this issue? cc. @justinfagnani @runem

@tonjohn
Copy link

tonjohn commented Nov 17, 2023

My team has the same issue as well - would be great to get this fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants