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

import from alias resolves incorrect relative path #435

Closed
m4rvr opened this issue Jun 23, 2020 · 0 comments
Closed

import from alias resolves incorrect relative path #435

m4rvr opened this issue Jun 23, 2020 · 0 comments

Comments

@m4rvr
Copy link
Contributor

m4rvr commented Jun 23, 2020

Describe the bug

After I have upgraded to 1.0.0-beta.4 the imports to my aliased packages e.g. @scope/pkg doesn't work.
The import paths are incorrect relative paths.

Before:
'/@/packages/test/src/index.ts'

After:
/../packages/test/src/index.ts

Info

The vite.config.ts is in the root, the playground is the directory from where I import the packages.
What I have found out is that the path is wrong after it has run through path.relative() here.

Reproduction

Reproduction

System Info

  • vite version: 1.0.0-beta.4
  • Operating System: Windows 10
@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

No branches or pull requests

1 participant