Skip to content

Commit 31b4167

Browse files
committed
docs: clarify the TS option's defaults
- "latest 2.x" is no longer accurate and quite outdated (we're on 4.x now), so just say it's the peerDep instead - @rollup/plugin-typescript calls the default a peerDep too: https://github.com/rollup/plugins/tree/master/packages/typescript#typescript - be more specific that you can pass in a different version or fork of TS (like `ttypescript`) through this option - follow-up to 8ec49c7 - auto-trim some whitespace-only lines - my editor does this automatically, and most of the README has trimmed whitespace anyway, so this keeps it consistent
1 parent 4a69b0d commit 31b4167

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,9 @@ See [#108](https://github.com/ezolenko/rollup-plugin-typescript2/issues/108)
156156
* `rollupCommonJSResolveHack`: false
157157

158158
On windows typescript resolver favors POSIX path, while commonjs plugin (and maybe others?) uses native path as module id. This can result in `namedExports` being ignored if rollup happened to use typescript's resolution. Set to true to pass resolved module path through `resolve()` to match up with `rollup-plugin-commonjs`.
159-
159+
160160
`rollup-plugin-commonjs` fixed this in `10.1.0`, so projects using this option who update to new version will be broken again.
161-
161+
162162
This also works around the similar bug affecting code splitting (see [rollup/issues/3094](https://github.com/rollup/rollup/issues/3094)).
163163

164164
* `objectHashIgnoreUnknownHack`: false
@@ -168,12 +168,12 @@ See [#108](https://github.com/ezolenko/rollup-plugin-typescript2/issues/108)
168168
* `useTsconfigDeclarationDir`: false
169169

170170
If true, declaration files will be emitted in the directory given in the tsconfig. If false, the declaration files will be placed inside the destination directory given in the Rollup configuration.
171-
171+
172172
Set to false if any other rollup plugins need access to declaration files.
173173

174-
* `typescript`: typescript module installed with the plugin
174+
* `typescript`: peerDependency
175175

176-
When typescript version installed by the plugin (latest 2.x) is unacceptable, you can import your own typescript module and pass it in as `typescript: require("path/to/other/typescript")`. Must be 2.0+, things might break if transpiler interfaces changed enough from what the plugin was built against.
176+
If you'd like to use a different version of TS than the peerDependency, you can import a different TypeScript module and pass it in as `typescript: require("path/to/other/typescript")`. Must be TS 2.0+, things might break if transpiler interfaces changed enough from what the plugin was built against.
177177

178178
* `transformers`: `undefined`
179179

0 commit comments

Comments
 (0)