Skip to content
This repository has been archived by the owner on Mar 7, 2024. It is now read-only.

[BUG]Windows 使用别名会导致路径错误 #183

Closed
yesmeck opened this issue Aug 29, 2019 · 4 comments
Closed

[BUG]Windows 使用别名会导致路径错误 #183

yesmeck opened this issue Aug 29, 2019 · 4 comments
Labels
bug Something isn't working

Comments

@yesmeck
Copy link
Member

yesmeck commented Aug 29, 2019

bug 描述
[详细地描述 bug,让大家都能理解]

src
├── foo
│   ├── author.ts
└── utils
    └── request.ts

如果在 request.ts 用别名引用了 author.ts 编译出来的路径就会错误。

import author from '@/foo/author'; 

会变成

import author from './foo/author'; 
@yesmeck yesmeck added the bug Something isn't working label Aug 29, 2019
@Darmody
Copy link
Contributor

Darmody commented Aug 29, 2019

alias 插件问题?

@yesmeck
Copy link
Member Author

yesmeck commented Aug 29, 2019

估计是

@yesmeck
Copy link
Member Author

yesmeck commented Aug 30, 2019

所有跟 path 有关的地方都要用 winPath 包一下。

@Darmody
Copy link
Contributor

Darmody commented Aug 30, 2019

所有跟 path 有关的地方都要用 winPath 包一下。

封装一下 path 方法?不直接使用 node 的 path

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants