【发布时间】:2015-12-16 20:40:10
【问题描述】:
我在我的应用程序中这样做
System.import('lib/bootstrap.js').then(m => {
this.socket = m.io("http://localhost:3000");
})
这是bootstrap.js
import io from 'socket.io-client';
export { io };
我通过jspm bundle lib/bootstrap.js outfile.js 创建了一个捆绑包。
当我尝试System.import('outfile.js') 时,已解决的 Promise m 只是一个空对象。
我在这里做错了什么?
System.import('outfile.js').then(m => {
this.socket = m.io("http://localhost:3000");
})
【问题讨论】:
标签: javascript ecmascript-6 systemjs jspm es6-module-loader