繁体   English   中英

rollup.js单个导入多个用法

[英]rollup.js single import multiple usages

你好汇总专家

我有一个反应组件和一个使用相同导入的商店

// file:ProfileStore.js

import ProfilesActions from './ProfilesActions.js'
....

-

//文件:Component.js

import ProfilesStore from '../flux/ProfilesStore'
....
render: function() {
    ....
    ProfilesActions.doSomething();
    ....
}

我的输出结果非常奇怪:

var ProfilesActions$1 = .....//The ProfileActions implementation 

var ProfilesStore = ....
    ProfilesActions$1.doSomething 

var Component = ....
    ProfilesActions.getMoreProfiles();

我怎么能告诉rollup.js使用没有后缀$1ProfilesActions的单个实例

非常感谢你

我了解到我必须在使用ProfilesActions所有地方调用import。

所以这意味着还要在Component.js导入

感谢@Clavin和@Akansh Gulati的帮助。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM