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 alias '@' conflict with npm scope like '@antv/data-set' #2446

Closed
ganyanchuan1989 opened this issue May 21, 2019 · 5 comments
Closed
Labels

Comments

@ganyanchuan1989
Copy link

What happens?

我是内网项目,现在用umi + bizcharts遇到问题是界面一直loading,不报错不提示。然后再document.ejs中加上:<script src="./data-set.min.js"></script>之后页面就能打开了。

最终定位:import DataSet from '@antv/data-set' 这段代码加入后就会出现界面一直loading的情况。初步怀疑是umi内置的webpack alias :'@': 'src'导致的。

最小可复现仓库

请使用 yarn create umi 创建,并上传到你的 GitHub 仓库

复现步骤,错误日志以及相关配置

相关环境信息

Umi 版本:2.0.1

  • Node 版本:8.9.0
  • 操作系统:win64
@ganyanchuan1989
Copy link
Author

@sorrycc 云老大帮忙看看哈

@ganyanchuan1989
Copy link
Author

刚刚试过用最新的create-umi 创建的一个空工程没有这个问题,是不是哪个版本修复了。

@ganyanchuan1989
Copy link
Author

直接把 @antv/data-set 目录拷贝到 node_module,然后import DataSet from 'data-set' 打开界面就正常了。所以应该还是别名‘@’和'@AntV'有冲突导致。

@sorrycc
Copy link
Member

sorrycc commented May 21, 2019

umi 升级到最新吧,scope 的 npm 包我们也一直在用的,没有出现过类似问题。

@stale
Copy link

stale bot commented Jul 21, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Jul 21, 2019
@sorrycc sorrycc closed this as completed Jul 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants