rave-load-jsx

0.4.0 • Public • Published

rave-load-jsx

Adds jsx file loading to rave.js based on the file extension.

By default, rave-load-jsx loads files with the .jsx extension and compiles the jsx syntax to JavaScript on the fly in the browser. It's only recommended to use this loader for development only. In production you should precompiled all of the jsx files. (How to coming soon).

Usage

First install it into your rave project via:

npm install --save rave-load-jsx

For CommonJS/node-formatted modules (or AMD-wrapped CommonJS):

var MyComponent = require('./my_component.jsx');
// ...
React.renderComponent(<MyComponent />, document.body);

For classic AMD modules:

define(['./my_component.jsx'], function (MyComponent) {
  // ...
  React.renderComponent(<MyComponent />, document.body);
});

For ES6-formatted modules:

import MyComponent from './my_component.jsx';
// ...
React.renderComponent(<MyComponent />, document.body);

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.4.0
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.4.0
    0
  • 0.2.0
    0
  • 0.1.2
    1
  • 0.1.1
    1
  • 0.1.0
    1

Package Sidebar

Install

npm i rave-load-jsx

Weekly Downloads

3

Version

0.4.0

License

MIT

Last publish

Collaborators

  • kidkarolis