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

fix: keep the same slash with system #82

Closed
wants to merge 1 commit into from
Closed

Conversation

aliuq
Copy link

@aliuq aliuq commented May 7, 2022

Forcing the direction of the slash to be specified can cause inconsistencies on different systems

Example, the methods backSlash always added a to right slash in the path end, in linux, this is wrong path charcter

// if the resolved module is not exists,
// we treat it as a virtual module
if (!fs.existsSync(resolved)) {
resolved = plugin.__virtualModulePrefix + backSlash(resolved)
// webpack virtual module should pass in the correct path
plugin.__vfs!.writeModule(resolved, '')
plugin.__vfsModules!.add(resolved)
}

unocss/unocss#797
unocss/unocss#931

@userquin
Copy link
Contributor

userquin commented May 7, 2022

@aliuq maybe #84 supersedes this PR?

@aliuq
Copy link
Author

aliuq commented May 7, 2022

@aliuq maybe #84 supersedes this PR?

Respect for all user's consideration of slash, either way, the existing problem can be solved

@antfu
Copy link
Member

antfu commented May 7, 2022

Test failed, I guess #84 is the more desired fix. Thanks.

@antfu antfu closed this May 7, 2022
@aliuq
Copy link
Author

aliuq commented May 7, 2022

@userquin u are right, an additional method is needed to handle the paths associated with the module

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 this pull request may close these issues.

4 participants