javascript - Webpack2 引入 bower安裝的庫返回空對象
問題描述
1.我使用的是webpack2,bower進行js庫的安裝和集成
2.這是我的app.js
import axios from ’axios’;import jQuery from ’jquery’;import xxhash from ’xxhash’;import fileuploader from ’./components/fileuploader’;console.log(xxhash);
3.xxhash庫地址:https://github.com/pierrec/js...
4.chrome瀏覽器console輸出結果
Object__proto__:Object__defineGetter__:__defineGetter__()__defineSetter__:__defineSetter__()__lookupGetter__:__lookupGetter__()__lookupSetter__:__lookupSetter__()constructor:Object()hasOwnProperty:hasOwnProperty()isPrototypeOf:isPrototypeOf()propertyIsEnumerable:propertyIsEnumerable()toLocaleString:toLocaleString()toString:toString()valueOf:valueOf()get __proto__:__proto__()set __proto__:__proto__()
5.其他幾個庫和我自己的組件使用都是正常的
問題解答
回答1:所以推薦使用npm管理庫文件
相關文章:
1. python - 獲取到的數(shù)據(jù)生成新的mysql表2. javascript - js 對中文進行MD5加密和python結果不一樣。3. mysql里的大表用mycat做水平拆分,是不是要先手動分好,再配置mycat4. window下mysql中文亂碼怎么解決??5. sass - gem install compass 使用淘寶 Ruby 安裝失敗,出現(xiàn) 4046. python - (初學者)代碼運行不起來,求指導,謝謝!7. 為啥不用HBuilder?8. python - flask sqlalchemy signals 無法觸發(fā)9. python的文件讀寫問題?10. 為什么python中實例檢查推薦使用isinstance而不是type?
