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. position:absolute、float、display:inline-block 都能实现相同效果,区别是什么?2. angular.js - Web应用,单页面应用Cache问题3. docker-compose 为何找不到配置文件?4. javascript - vue更改当前节点元素5. css3 - 这个效果用 CSS 可以实现吗?border-image6. angular.js - angular post的Content-Type被设置,导致不能上传图片,求助!!7. android - 如何缩小APK的体积8. vue.js - vue 打包后 nginx 服务端API请求跨域问题无法解决。9. android - webview 自定义加载进度条10. mac连接阿里云docker集群,已经卡了2天了,求问?

网公网安备