Skip to content

Open in editor path is missing slashes #501

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
Samuell1 opened this issue Jan 13, 2018 · 3 comments
Closed

Open in editor path is missing slashes #501

Samuell1 opened this issue Jan 13, 2018 · 3 comments

Comments

@Samuell1
Copy link

Samuell1 commented Jan 13, 2018

When opening file from devtools there are missing slashes in path for file. This issue is caused because of template literals is escaping with \.

obrazok

To fast fix this issue simply add replace on this line: https://github.com/vuejs/vue-devtools/blob/24812e5542bb359a06a3e62379fd8c8633ae6034/src/devtools/views/components/ComponentInspector.vue#L87
const file = this.target.file.replace(/\\/g, '/')

@Akryum Akryum added the bug label Jan 13, 2018
@yyx990803
Copy link
Member

Looks like a windows issue? Might need to be fixed in vue-loader as the file path info comes from vue-loader.

@Samuell1
Copy link
Author

Yes, iam using windows.

@yyx990803
Copy link
Member

Nevermind, looks like it can be fixed here with the proposed change. Although I'm not entirely sure if all Windows editors can handle / delimited paths, would it be safer to replace them to '\\\\' instead? @Akryum can you confirm on windows?

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

No branches or pull requests

3 participants