javascript:ReferenceError:导出未定义

es6 / Babel:我的文件夹看起来像这样:

A/ index.js a.js ...other 

我通过index.js文件公开a.js内容如下:

 export { foo, bar } from './a'; 

这样我就可以使用以下方式导入它:

 import { foo, bar } from '../A'; 

但是现在,我想在index.js使用* ,以便万一从a.js导出另一个东西,它会自动显示出来:

 export * from './a'; 

但是当我这样做,我得到这个错误:

Uncaught ReferenceError:未定义导出

我在这里做错了什么?