Skip to content

Commit 5ccaad3

Browse files
authored
Merge pull request #22 from tksst/doc-with-pnpm
docs: description for use with pnpm
2 parents 4cca167 + 68de8d3 commit 5ccaad3

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,18 @@ npm i -D better-typescript-lib
3030

3131
Starting from TypeScript 4.5, the TypeScript compiler detects existence of `@typescript/xxx` packages (e.g. `@typescript/es2015`) and uses them instead of the built-in definitions. By installing `better-typescript-lib`, these package names are mapped to corresponding `@better-typescript-lib/xxx` packages.
3232

33+
### with pnpm
34+
35+
With pnpm, you must append the following line to the `.npmrc` file:
36+
37+
```properties
38+
public-hoist-pattern[]=@typescript/*
39+
```
40+
41+
With pnpm the `@better-typescript-lib/xxx` packages are not installed to `node_modules/@typescript/xxx` without [`public-hoist-pattern`](https://pnpm.io/npmrc#public-hoist-pattern).
42+
43+
This is because, unlike npm and yarn, by default pnpm does not allow your source code to access dependencies that have not been added to your project as dependencies.
44+
3345
## Supported TypeScript Versions
3446

3547
| better-typescript-lib | TypeScript |

0 commit comments

Comments
 (0)