tommoor / emojione-picker

A react emoji picker for use with emojione
http://tommoor.github.io/emojione-picker
MIT License
261 stars 61 forks source link

Necessary Webpack Configuration #36

Closed jurij closed 7 years ago

jurij commented 8 years ago

Hi,

with this change and using webpack with react, i get this error message:

Module parse failed: /Users/juRiii/dev/go/src/github.com/juRiii/.../node_modules/emojione-picker/node_modules/emojione/emoji.json Unexpected token (1:11) You may need an appropriate loader to handle this file type.

My solution is adding this to my webpack configuration:

loaders: [
    { 
        test: /\.json$/, 
        loader: "json-loader"
    }
]

and doing

npm install --save json-loader

A proper mention of this situation in README.md would be nice, it took me a while 😄