目前这是一个实验性语法(第一阶段),可以通过Babel进行支持,但暂时不能在Visual Studio Code中本地支持。
获取更多信息:
Proposed addition:
The proposed addition follows this same symmetric pattern:
Importing a namespace exotic object (existing):
import * as ns from "mod";
Exporting that name (existing):
import * as ns from "mod"; export {ns};
Symmetric "export from" (proposed):
export * as ns from "mod";
因此,为了修复错误,请更改您的代码:
import * as actions from './Something.actions.js';
export { actions };
看起来你的代码有语法错误,请尝试在问题周围加上一些括号来修复它,就像这样:
export { * as actions } from './Something.actions.js';
如果您有任何进一步的问题,您可以查看这个MDN文章。
export { variable1 as name1, variable2 as name2, …, nameN };
*
实际上意味着全部
。 - Ionut Necula