Is it possible to export the result of “import * as” in ES2015?

◇◆丶佛笑我妖孽 提交于 2019-12-03 12:29:10

No, this was simply missed in ES6. There is a stage 1 proposal to add these, though, and rollup will consider implementing it.

Until then, you will need to use two declarations and a local binding, altough there's no need to clone the object:

import * as name from 'module';
export { name };
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!