##DEPRECATED: Babel is now included on elixir by default.
React-tools is deprecated. For more information, visit https://fb.me/react-tools-deprecated
Simple extension to laravel elixir to precompile Facebook React JSX templates into javascript.
npm install --save-dev laravel-elixir-react
var elixir = require("laravel-elixir");
require("laravel-elixir-react");
elixir(function(mix) {
mix.react("app.jsx");
});
First argument is the entry point of your application (default directory is resources/assets/js). In third argument you could pass react options. In production bundle will be compressed.
elixir(function(mix) {
mix.react("app.jsx", {
output: "app.js",
sourceMap: false,
harmony: false,
sourceFilename: "app.js.map",
stripTypes: false
});
});