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/config/run.md
+22Lines changed: 22 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,7 @@ import { defineConfig } from 'vite-plus';
7
7
8
8
exportdefaultdefineConfig({
9
9
run: {
10
+
enablePrePostScripts: true,
10
11
cache: {
11
12
/* ... */
12
13
},
@@ -17,6 +18,27 @@ export default defineConfig({
17
18
});
18
19
```
19
20
21
+
## `run.enablePrePostScripts`
22
+
23
+
-**Type:**`boolean`
24
+
-**Default:**`true`
25
+
26
+
Whether to automatically run `preX`/`postX` package.json scripts as lifecycle hooks when script `X` is executed.
27
+
28
+
When enabled (the default), running a script like `test` will automatically run `pretest` before it and `posttest` after it, if they exist in `package.json`.
0 commit comments