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
Note that there is a difference between `prepare` and `prepack` scripts:
63
63
64
-
-`prepare` is run when the package is published, as well as when its is installed from a git URL. It may also run when dependencies are installed based on the package manager.
65
-
-`prepack` only runs when the package is packed for publishing.
66
-
67
-
If you are not sure which one to use, we recommend going with `prepare`.
64
+
-`prepare` is run when:
65
+
- The package is published with Yarn 1 (`yarn publish`), npm (`npm publish`) or pnpm (`pnpm publish`)
66
+
- The package is installed from a GIT URL with Yarn 1 (`yarn add <git-url>`), npm (`npm install <git-url>`) or pnpm (`pnpm add <git-url>`)
67
+
-`prepack` is run when:
68
+
- The package is published with any package manager (`yarn publish`, `npm publish`, `pnpm publish`)
69
+
- The package is installed from a GIT URL with Yarn 4 (`yarn add package-name@<git-url>`)
70
+
71
+
If you are not sure which one to use, we recommend going with `prepare` as it works during both publishing and installing from GIT with more package managers.
0 commit comments