Skip to content

cushJS/cush-plugin-sucrase

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cush-plugin-sucrase v0.1.0

This plugin handles Flow, TypeScript, JSX, and ES modules.

This plugin is required by js-bundle.

Flow

Strip flow types from assets.

Packages using flow must have flow-bin in their devDependencies.

TypeScript

Strip types from .ts and .tsx assets.

The typescript plugin is required for TypeScript assets to be recognized.

The jsx plugin is required for .tsx assets to be recognized.

JSX

Transform JSX to valid Javascript.

Assets containing JSX must have the .jsx file extension.

The jsx plugin is required for JSX assets to be recognized.

ES modules

module.exports = exports.default; is used when a module only has an export default statement. This often eliminates the need for require('es-module').default.