search

Home  >  Q&A  >  body text

javascript - Webpack2 introduces library installed by bower returns empty object

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梦2743 days ago849

reply all(1)I'll reply

  • 代言

    代言2017-07-05 10:42:25

    So it is recommended to use npm to manage library files

    reply
    0
  • Cancelreply