2
我試圖用角定時器的WebPack,ES6和moment的NPM模塊和humanize-duration角定時器的WebPack
我的實現是:
import 'moment';
import 'humanize-duration';
import 'angular-timer';
而我得到的錯誤ReferenceError: humanizeDuration is not defined
。
當然,角度計時器需要變量humanizeDuration,並建議在requirements section中使用bower和腳本src。在我的理解中,用webpack導入src與在腳本標記中使用src相同。
你是如何安裝這些庫的?通過npm? (npm是首選) – cspotcode
嗨,@Yves你能解決這個問題嗎? –