javascript - Webpack2 introduces library installed by bower returns empty object
过去多啦不再A梦
过去多啦不再A梦 2017-07-05 10:40:25
0
1
845

1. I use webpack2 and bower to install and integrate js libraries

2.This is my app.js

import axios from 'axios';
import jQuery from 'jquery';
import xxhash from 'xxhash';
import fileuploader from './components/fileuploader';
console.log(xxhash);

3.xxhash library address: https://github.com/pierrec/js...

4.Chrome browser console output results

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. The use of several other libraries and my own components is normal

过去多啦不再A梦
过去多啦不再A梦

reply all(1)
代言

So it is recommended to use npm to manage library files

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template