# @sucrase/webpack-loader

> Webpack loader for Sucrase

Latest version **2.0.0** (published 2018-06-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install @sucrase/webpack-loader
pnpm add @sucrase/webpack-loader
yarn add @sucrase/webpack-loader
bun add @sucrase/webpack-loader
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2018-06-11 |
| First published | 2018-01-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 7.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5874 |
| Author | Alan Pierce |
| Maintainers | alangpierce |

## Links

- npm: https://www.npmjs.com/package/@sucrase/webpack-loader
- Repository: https://github.com/alangpierce/sucrase/tree/master/integrations/webpack-loader
- npm.io page: https://npm.io/package/@sucrase/webpack-loader

## Dependencies (1)

- [loader-utils](https://npm.io/package/loader-utils.md) ^1.1.0

## Recent versions

- 2.0.0 (latest) — 2018-06-11
- 1.0.2 — 2018-01-28
- 1.0.1 — 2018-01-28
- 1.0.0 — 2018-01-24

## README

# Sucrase Webpack loader

[![npm version](https://badge.fury.io/js/@sucrase%2Fwebpack-loader.svg)](https://www.npmjs.com/package/@sucrase/webpack-loader)
[![MIT License](https://img.shields.io/npm/l/express.svg?maxAge=2592000)](LICENSE)

This is a simple Webpack loader that makes it easy to use
[Sucrase](https://github.com/alangpierce/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](https://github.com/alangpierce/sucrase/tree/master/integrations/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']
        }
      }
    }
  ]
}
```

---
_Source: https://npm.io/package/@sucrase/webpack-loader · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
