@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']
        }
      }
    }
  ]
}

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 2.0.0
    57,621
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 2.0.0
    57,621
  • 1.0.2
    0
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i @sucrase/webpack-loader

Weekly Downloads

57,621

Version

2.0.0

License

MIT

Unpacked Size

7.29 kB

Total Files

8

Last publish

Collaborators

  • alangpierce