Skip to content
This repository has been archived by the owner on Aug 4, 2021. It is now read-only.

rollup/rollup-plugin-sucrase

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Moved

This package has moved and is now available at @rollup/plugin-sucrase. Please update your dependencies. This repository is no longer maintained.

rollup-plugin-sucrase

Use Sucrase with Rollup.

Installation

yarn add -D rollup-plugin-sucrase

Usage

An example of compiling TypeScript (the node-resolve plugin is added to automatically add file extensions, since TypeScript expects not to find them):

// rollup.config.js
import sucrase from 'rollup-plugin-sucrase';
import resolve from 'rollup-plugin-node-resolve';

export default {
  input: 'src/index.ts',
  output: {
    file: 'dist/bundle.js',
    format: 'cjs'
  },
  plugins: [
    resolve({
       extensions: ['.js', '.ts' ]
    }),
     sucrase({
      exclude: ['node_modules/**'],
      transforms: ['typescript']
    })
  ]
}

License

LIL.