Skip to content

Don't run the pre/post scripts #2891

@zkochan

Description

@zkochan

NOTE: It is possible to return how pre/post scripts worked by setting the enable-pre-post-scripts setting to true (since v6.1.0)


When running pnpm run foo, don't run the prefoo script and the postfoo script.

Yarn 2 already deprecated the pre/post scripts:

In particular, we intentionally don't support arbitrary pre and post hooks for user-defined scripts (such as prestart). This behavior, inherited from npm, caused scripts to be implicit rather than explicit, obfuscating the execution flow. It also led to surprising executions with yarn serve also running yarn preserve.

https://yarnpkg.com/advanced/lifecycle-scripts

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions