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

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -