Skip to content

Commit

Permalink
docs: declare node-linker when using Yarn 3 (#7113)
Browse files Browse the repository at this point in the history
Because of yarn 3 use PnP by default, but electron-builder still need node-modules.
So add configuration in the  `.yarnrc.yaml`:
```
nodeLinker: "node-modules"
```
will declare to use node-modules instead of PnP.
  • Loading branch information
ouliuquan committed Sep 2, 2022
1 parent 0c52841 commit 5eb002b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
Expand Up @@ -92,6 +92,14 @@ public-hoist-pattern=*
shamefully-hoist=true
```

### Note for Yarn 3

Yarn 3 use PnP by default, but electron-builder still need node-modules(ref: [yarnpkg/berry#4804](https://github.com/yarnpkg/berry/issues/4804#issuecomment-1234407305)). Add configuration in the `.yarnrc.yaml` as follows:
```
nodeLinker: "node-modules"
```
will declare to use node-modules instead of PnP.

## Quick Setup Guide

[electron-webpack-quick-start](https://github.com/electron-userland/electron-webpack-quick-start) is a recommended way to create a new Electron application. See [Boilerplates](https://www.electron.build/#boilerplates).
Expand Down

0 comments on commit 5eb002b

Please sign in to comment.