Skip to content

Commit 9559132

Browse files
committed
Remove postinstall from package.json with custom Yarn plugin
1 parent eb3594a commit 9559132

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
module.exports = {
2+
name: 'plugin-remove-postinstall',
3+
factory: () => ({
4+
hooks: {
5+
beforeWorkspacePacking(workspace, rawManifest) {
6+
delete rawManifest.scripts.postinstall;
7+
},
8+
},
9+
}),
10+
};

.yarnrc.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
nodeLinker: node-modules
22

3+
plugins:
4+
- path: .yarn/plugins/plugin-remove-postinstall.cjs
5+
36
yarnPath: .yarn/releases/yarn-3.1.0.cjs

0 commit comments

Comments
 (0)