From c08a4fd13b7f1aad234eda284b5d544876113e58 Mon Sep 17 00:00:00 2001 From: Jimmy Cleveland Date: Wed, 11 May 2022 08:06:44 -0700 Subject: [PATCH 1/2] 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. --- docs/01-command-line-reference.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/01-command-line-reference.md b/docs/01-command-line-reference.md index 99fc9321057..54647239d2c 100755 --- a/docs/01-command-line-reference.md +++ b/docs/01-command-line-reference.md @@ -443,7 +443,12 @@ 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` From bd5ca1a4754922bc37ea2a6754899465dd5baac8 Mon Sep 17 00:00:00 2001 From: Jimmy DC Date: Fri, 13 May 2022 08:15:15 -0600 Subject: [PATCH 2/2] lint configPlugin docs changes --- docs/01-command-line-reference.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/01-command-line-reference.md b/docs/01-command-line-reference.md index 54647239d2c..703a221b7bc 100755 --- a/docs/01-command-line-reference.md +++ b/docs/01-command-line-reference.md @@ -444,6 +444,7 @@ rollup --config rollup.config.ts --configPlugin @rollup/plugin-typescript ``` 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"], ```