Skip to content

Automattic/jsx-require-extension

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jsx-require-extension

Build Status NPM version

A simple node module to register a require.extensions loader for JSX files. For more information about JSX, visit Facebook's JSX Specification.

Usage

By simply requiring jsx-require-extension, you can immediately require JSX files.

require( 'jsx-require-extension' );
require( './my-react-component.jsx' );

This module is intended to be used directly in other modules without need for a setup process. For example, you can use it as a Mocha compiler through Mocha's --compilers flag:

$ mocha --compilers jsx:jsx-require-extension

Lastly, if you want to pass flags, you can instead require the corresponding file found in the options directory:

require( 'jsx-require-extension/options/harmony' );

Versioning

Use the following table to determine which version of jsx-require-extension works with your version of React.

React jsx-require-extension
0.1.x - 0.11.x 0.1
0.12.x+ 0.2

License

Copyright (c) 2014 Automattic, Inc.

Released under the MIT License.

About

A require.extensions loader for JSX files

Resources

License

Stars

Watchers

Forks

Packages

No packages published