私は自分のアプリケーションでこれをやっています
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");
})