babeljs - Using react-router w/ brunch/babel -


i'm attempting use react-router in brunch/babel setup. in app.js have:

import react "react" import reactdom "react-dom" import { router, route, link } "react-router" 

this gives me:

uncaught error: cannot find module "history/lib/createhashhistory" "react-router/router"

when looking @ referenced line see:

var _historylibcreatehashhistory = require('history/lib/createhashhistory'); 

when inspecting app.js that's generated via brunch see:

require.register('history/createbrowserhistory', function(exports,req,module) {   ... }); 

how go fixing createbrowserhistory gets imported properly?

the module history listed peer dependency react-router, means need install through command npm install history --save.


Comments

Popular posts from this blog

c++ - llvm function pass ReplaceInstWithInst malloc -

Cross-Compiling Linux Kernel for Raspberry Pi - ${CCPREFIX}gcc -v does not work -

java.lang.NoClassDefFoundError When Creating New Android Project -