我在我的应用程序中这样做
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')
解决的 Promisem
只是一个空对象。我在这里做错了什么?
System.import('outfile.js').then(m => {
this.socket = m.io("http://localhost:3000");
})