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

webpack issue on backSlash on non Windows OS #83

Closed
userquin opened this issue May 7, 2022 · 3 comments · Fixed by #84
Closed

webpack issue on backSlash on non Windows OS #83

userquin opened this issue May 7, 2022 · 3 comments · Fixed by #84

Comments

@userquin
Copy link
Contributor

userquin commented May 7, 2022

This utils.ts should be something like this (for context check unocss/unocss#931):

import { sep } from 'path'

export function slash (path: string) {
  return path1.replace(/\\/g, '/')
}

export function backSlash (path: string) {
  return path.replace(/[\\/]/g, sep)
}

@aliuq

@aliuq
Copy link

aliuq commented May 7, 2022

Why not let the slash be consistent with the system's

@userquin
Copy link
Contributor Author

userquin commented May 7, 2022

@aliuq
Copy link

aliuq commented May 7, 2022

@aliuq check this comment: https://github.com/unjs/unplugin/blob/main/src/webpack/index.ts#L106

Sorry, I don't understand what this path separator has to do with

userquin added a commit to userquin/unplugin that referenced this issue May 7, 2022
I still with pnpm 6 and so I cannot test it...

closes unjs#83
@antfu antfu closed this as completed in #84 May 7, 2022
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