All Projects → joecohens → laravel-elixir-react

joecohens / laravel-elixir-react

Licence: MIT License
Laravel Elixir React Extension

Programming Languages

javascript
184084 projects - #8 most used programming language

##DEPRECATED: Babel is now included on elixir by default.

React-tools is deprecated. For more information, visit https://fb.me/react-tools-deprecated

laravel-elixir-react

Simple extension to laravel elixir to precompile Facebook React JSX templates into javascript.

Install

npm install --save-dev laravel-elixir-react

Usage

Example Gulpfile:

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.

Advanced example

elixir(function(mix) {
    mix.react("app.jsx", {
    	output: "app.js",
        sourceMap: false,
        harmony: false,
        sourceFilename: "app.js.map",
        stripTypes: false
    });
});
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].