Skip to content

Commit bbd54b7

Browse files
Update docs for --configPlugin using typescript (#4495)
* 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
1 parent f3a1fa3 commit bbd54b7

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

docs/01-command-line-reference.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,13 @@ Allows specifying Rollup plugins to transpile or otherwise control the parsing o
443443
rollup --config rollup.config.ts --configPlugin @rollup/plugin-typescript
444444
```
445445

446-
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 `={...}`.
446+
Note for Typescript: make sure you have the Rollup config file in your `tsconfig.json`'s `include` paths. For example:
447+
448+
```
449+
"include": ["src/**/*", "rollup.config.ts"],
450+
```
451+
452+
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 `={...}`.
447453

448454
#### `-v`/`--version`
449455

0 commit comments

Comments
 (0)