You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/browsers.md
+20-8Lines changed: 20 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,23 @@
1
1
# Managing browser binaries
2
2
3
-
Playwright comes bundled with browsers, and by default `npm i playwright` downloads
4
-
all 3 browsers inside the `node_modules/` folder. This way no extra steps are needed
5
-
to get playwright up and running.
3
+
Each version of Playwright needs specific versions of browser binaries to operate.
6
4
7
-
However, Playwright also has rich configuration to support various strategies
8
-
for browser management.
5
+
By default it downloads Chromium, WebKit and Firefox browsers into the `node_modules/` folder. This way no extra steps are needed to get playwright up and running:
6
+
7
+
```sh
8
+
npm i playwright
9
+
```
10
+
11
+
These browsers will take hundreds of megabytes of the disk space when installed:
12
+
13
+
```sh
14
+
du -hs ./node_modules/.local-browsers/*
15
+
281M .local-browsers/chromium-XXXXXX
16
+
187M .local-browsers/firefox-XXXX
17
+
180M .local-browsers/webkit-XXXX
18
+
```
19
+
20
+
To mitigate that, Playwright has a rich set of options to control browser management.
9
21
10
22
## Download from artifact repository
11
23
@@ -21,10 +33,10 @@ $ PLAYWRIGHT_DOWNLOAD_HOST=192.168.1.78 npm i playwright
21
33
22
34
## Share browser binaries across projects
23
35
24
-
Sometimes developers work with multiple NPM projects that all use Playwright.
36
+
Often developers work with multiple NPM projects that all use Playwright.
25
37
By default, every project will have browser binaries in its own `node_modules/` folder.
26
-
To save some HDD space and to speedup installation, Playwright can re-use
27
-
browser binaries.
38
+
To save the disk space and to speedup installation, Playwright can re-use
0 commit comments