babeljs - Importing autobahn with webpack & babel -


i trying import library "autobahn" in project using babel , webpack. can import minified/compiled web version of library in project, importing npm installed package provides http://pastebin.com/lwfl0m85. namely error:

error in ./~/autobahn/package.json module parse failed: /~snip~/web/node_modules/autobahn/package.json unexpected token (2:9) may need appropriate loader handle file type. 

is there way debug further? given error, cannot determine best plan of action me troubleshoot this. ultimately, stay away async module loaders , keep webpack's flattening module loader if possible.

the way autobahn built, when require library attempt load it's package.json, see line 17.

you need add json-loader webpack.config.js webpack able parse file.


Comments