@@ -26,6 +26,35 @@ setting to `false`.
26
26
| ` pnpm i --frozen-lockfile ` | ` pnpm-lock.yaml ` is not updated |
27
27
| ` pnpm i --lockfile-only ` | Only ` pnpm-lock.yaml ` is updated |
28
28
29
+ ## Options for filtering dependencies
30
+
31
+ Without a lockfile, pnpm has to create one, and it must be consistent regardless of dependencies
32
+ filtering, so running ` pnpm install --prod ` on a directory without a lockfile would still resolve the
33
+ dev dependencies, and it would error if the resolution is unsuccessful. The only exception for this rule
34
+ are ` link: ` dependencies.
35
+
36
+ Without ` --frozen-lockfile ` , pnpm will check for outdated information from ` file: ` dependencies, so
37
+ running ` pnpm install --prod ` without ` --frozen-lockfile ` on an environment where the target of ` file: `
38
+ has been removed would error.
39
+
40
+ ### --prod, -P
41
+
42
+ * Default: ** false**
43
+ * Type: ** Boolean**
44
+
45
+ If ` true ` , pnpm will not install any package listed in ` devDependencies ` and will remove
46
+ those insofar they were already installed.
47
+ If ` false ` , pnpm will install all packages listed in ` devDependencies ` and ` dependencies ` .
48
+
49
+ ### --dev, -D
50
+
51
+ Only ` devDependencies ` are installed and ` dependencies ` are removed insofar they
52
+ were already installed.
53
+
54
+ ### --no-optional
55
+
56
+ ` optionalDependencies ` are not installed.
57
+
29
58
## Options
30
59
31
60
### --force
@@ -48,24 +77,6 @@ If a package won't be found locally, the installation will fail.
48
77
If ` true ` , staleness checks for cached data will be bypassed, but missing data
49
78
will be requested from the server. To force full offline mode, use ` --offline ` .
50
79
51
- ### --prod, -P
52
-
53
- * Default: ** false**
54
- * Type: ** Boolean**
55
-
56
- If ` true ` , pnpm will not install any package listed in ` devDependencies ` and will remove
57
- those insofar they were already installed.
58
- If ` false ` , pnpm will install all packages listed in ` devDependencies ` and ` dependencies ` .
59
-
60
- ### --dev, -D
61
-
62
- Only ` devDependencies ` are installed and ` dependencies ` are removed insofar they
63
- were already installed.
64
-
65
- ### --no-optional
66
-
67
- ` optionalDependencies ` are not installed.
68
-
69
80
### --no-lockfile
70
81
71
82
Don't read or generate a ` pnpm-lock.yaml ` file.
0 commit comments