Skip to content

Run on Window produce Window path (backslash) instead of Posix path. #5

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

Closed
joshuaavalon opened this issue Apr 24, 2019 · 1 comment · Fixed by #6
Closed

Run on Window produce Window path (backslash) instead of Posix path. #5

joshuaavalon opened this issue Apr 24, 2019 · 1 comment · Fixed by #6

Comments

@joshuaavalon
Copy link

Running this plugin on Window produce paths like ..\\..\\utils instead of ../../utils.

This is because node use environment specific path.

import { dirname, resolve, relative } from "path";

I recommend using something like slash to convert the path to posix path.

const file = relative(fileDir, resolve(baseUrl, out));

@danielpza
Copy link
Member

danielpza commented Apr 24, 2019

Thanks for the bug report, I'll check it out, I think path have a normalize function that fix this issue or a separator

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.

2 participants