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/src/en/guide/essentials/settings.md
+55-7
Original file line number
Diff line number
Diff line change
@@ -60,6 +60,29 @@ VITE_INJECT_APP_LOADING=true
60
60
VITE_ARCHIVER=true
61
61
```
62
62
63
+
```bash [.env.production]
64
+
# Public Path for Resources, must start and end with /
65
+
VITE_BASE=/
66
+
67
+
# API URL
68
+
VITE_GLOB_API_URL=https://mock-napi.vben.pro/api
69
+
70
+
# Whether to enable compression, can be set to none, brotli, gzip
71
+
VITE_COMPRESS=gzip
72
+
73
+
# Whether to enable PWA
74
+
VITE_PWA=false
75
+
76
+
# vue-router mode
77
+
VITE_ROUTER_HISTORY=hash
78
+
79
+
# Whether to inject global loading
80
+
VITE_INJECT_APP_LOADING=true
81
+
82
+
# Whether to generate dist.zip after packaging
83
+
VITE_ARCHIVER=true
84
+
```
85
+
63
86
:::
64
87
65
88
## Dynamic Configuration in Production Environment
@@ -142,6 +165,7 @@ import { defineOverridesPreferences } from '@vben/preferences';
142
165
/**
143
166
* @description Project configuration file
144
167
* Only a part of the configuration in the project needs to be covered, and unnecessary configurations do not need to be covered. The default configuration will be automatically used
168
+
* !!! Please clear the cache after changing the configuration, otherwise it may not take effect
- The `overridesPreferences` method only needs to override a part of the configurations in the project. There's no need to override configurations that are not needed; they will automatically use the default settings.
516
563
- Any configuration item can be overridden. You just need to override it within the `overridesPreferences` method. Do not modify the default configuration file.
564
+
- Please clear the cache after changing the configuration, otherwise it may not take effect.
0 commit comments