reactjs - Integrating React to a build flow with module transpilation with Babel -


i having trouble module transpilation babel.

when transpiling code amd modules babel, can make work in browser including requirejs library. when try introduce react equation experiencing troubles, react not play nice amd. having mismatch errors (http://requirejs.org/docs/errors.html#mismatch) cause react loaded synchronously in vendor.js file.

if tried other way around, using commonjs default module spec babel uses, have no idea how make work in browser. without library requirejs in former example, browser giving errors "exports not defined". tried include stuff es6-module-loader or babel browerser polyfill, without success.

ps: build flow using broccolijs.

it seems answer in webpack. after using babel transpile code es5 in broccoli, used broccoli webpack plugin make transpiled code browser ready.


Comments

Popular posts from this blog

Android : Making Listview full screen -

javascript - Parse JSON from the body of the POST -

javascript - Chrome Extension: Interacting with iframe embedded within popup -