0
我有一個angular2-webpack應用程序,想實現stomp,sockjs-client,websocket。如何在angular2-webpack中導入「stompjs/lib/stomp.min」
已添加「sockjs」:「0.3.18」, 「stompjs」:「2.3.3」 in package.json。
這樣當在一個服務寫:
import * as SockJS from 'sockjs-client';
import { Client, Message, Stomp } from 'stompjs/lib/stomp.min';
有一個錯誤:
can't find name "Client",
can't find name "Message",
can't find name "Stomp",