Skip to content

Commit

Permalink
docs: added include + exclude option
Browse files Browse the repository at this point in the history
  • Loading branch information
tada5hi committed Aug 28, 2023
1 parent c3a3ef7 commit ea1141d
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion packages/swc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,11 @@ Then call `rollup` either via the [CLI](https://www.rollupjs.org/guide/en/#comma
## Options

The plugin accepts an object as input parameter to modify the default behaviour.
This object has an `swc` property to provide library specific [Options](https://swc.rs/docs/configuration/swcrc).

### `swc`

- Type: [Options](https://swc.rs/docs/configuration/swcrc)
- Default: `undefined`

```typescript
import type { Options as SWCOptions } from '@swc/core';
Expand All @@ -58,6 +62,22 @@ declare type Options = {
};
```

### `exclude`

- Type: `String` | `Array[...String]`
- Default: `null`

A [picomatch pattern](https://github.com/micromatch/picomatch),
or array of patterns, which specifies the files in the build the plugin should _ignore_. By default no files are ignored.

### `include`

- Type: `String` | `Array[...String]`
- Default: `null`

A [picomatch pattern](https://github.com/micromatch/picomatch),
or array of patterns, which specifies the files in the build the plugin should operate on. By default all files are targeted.

## Alternatives

Alternative transpiler/transformer, which are also officially offered, are [Babel](https://www.npmjs.com/package/@rollup/plugin-babel) and [Sucrase](https://www.npmjs.com/package/@rollup/plugin-sucrase).
Expand Down

0 comments on commit ea1141d

Please sign in to comment.