Skip to content

Commit

Permalink
Update docs for --configPlugin using typescript (#4495)
Browse files Browse the repository at this point in the history
* Update docs for --configPlugin using typescript

The documentation gives examples for using `@rollup/plugin-typescript` to parse the Rollup configuration file, with a CLI code example. However, that example will fail to build with a somewhat misleading error if the Rollup config is not declared in the `tsconfig.json`'s `include` property, so a note about needing to do so has been added with this commit.

* lint configPlugin docs changes
  • Loading branch information
Jimmydalecleveland committed May 13, 2022
1 parent f3a1fa3 commit bbd54b7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion docs/01-command-line-reference.md
Expand Up @@ -443,7 +443,13 @@ Allows specifying Rollup plugins to transpile or otherwise control the parsing o
rollup --config rollup.config.ts --configPlugin @rollup/plugin-typescript
```

It supports the same syntax as the [`--plugin`](guide/en/#-p-plugin---plugin-plugin) option i.e., you can specify the option multiple times, you can omit the `@rollup/plugin-` prefix and just write `typescript` and you can specify plugin options via `={...}`.
Note for Typescript: make sure you have the Rollup config file in your `tsconfig.json`'s `include` paths. For example:

```
"include": ["src/**/*", "rollup.config.ts"],
```

This option supports the same syntax as the [`--plugin`](guide/en/#-p-plugin---plugin-plugin) option i.e., you can specify the option multiple times, you can omit the `@rollup/plugin-` prefix and just write `typescript` and you can specify plugin options via `={...}`.

#### `-v`/`--version`

Expand Down

0 comments on commit bbd54b7

Please sign in to comment.