@sucrase/webpack-loader
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

Sucrase Webpack loader

npm version MIT License

This is a simple Webpack loader that makes it easy to use Sucrase in your build.

Note: Object rest/spread syntax (e.g. {...a, b: c}) requires Webpack 4. For earlier Webpack versions, you can use webpack-object-rest-spread-plugin alongside this loader.

Usage

First install the package and Sucrase as a dev dependency:

yarn add --dev @sucrase/webpack-loader sucrase

Then add it as a loader to your webpack config:

module: {
  rules: [
    {
      test: /\.js$/,
      use: {
        loader: '@sucrase/webpack-loader',
        options: {
          transforms: ['jsx']
        }
      }
    }
  ]
}

Readme

Keywords

none

Package Sidebar

Install

npm i @sucrase/webpack-loader

Weekly Downloads

44,560

Version

2.0.0

License

MIT

Unpacked Size

7.29 kB

Total Files

8

Last publish

Collaborators

  • alangpierce