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

Judge CommonJS package that use scope on Windows incorrectly #1630

Closed
2 of 3 tasks
zhoudewei2526 opened this issue Jan 22, 2021 · 2 comments
Closed
2 of 3 tasks

Judge CommonJS package that use scope on Windows incorrectly #1630

zhoudewei2526 opened this issue Jan 22, 2021 · 2 comments

Comments

@zhoudewei2526
Copy link
Contributor

⚠️ IMPORTANT ⚠️ Please check the following list before proceeding. If you ignore this issue template, your issue will be directly closed.

  • Read the docs.
  • Use Vite >=2.0. (1.x is no longer supported)
  • If the issue is related to 1.x -> 2.0 upgrade, read the Migration Guide first.

Describe the bug

It is incorrect to judge whether the package is CommonJS On Windows 。And the npm package uses scope(like @vhook/test) .
image
image

Reproduction

repository link

System Info

  • vite version: 2.0.0-beta.35
  • Operating System: Windows
  • Node version: 12.18.0
  • Package manager (npm/yarn/pnpm) and version:
    yarn 1.16.0

Logs (Optional if provided reproduction)

  1. Run vite or vite build with the --debug flag.
  2. Provide the error log here.
@zhoudewei2526
Copy link
Contributor Author

path.resolve return path segment separator is \ on Windows,but in metadata.json path segment separator is /
path.relative api
image
When I add .replace(/\\/g,'/'),it wroks .
image

zhoudewei2526 pushed a commit to zhoudewei2526/vite that referenced this issue Jan 22, 2021
@yyx990803
Copy link
Member

closed via #1631

@github-actions github-actions bot locked and limited conversation to collaborators Jul 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants