This package has been deprecated

Author message:

React now uses babel, use Elixir 3 built in babel

laravel-elixir-react

0.1.2 • Public • Published

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
    });
});

Package Sidebar

Install

npm i laravel-elixir-react

Weekly Downloads

5

Version

0.1.2

License

MIT

Last publish

Collaborators

  • joecohen