Skip to content

Commit 5f9c41d

Browse files
committed
docs: ✏️ update appConfig documentation to include obfuscator option and its details
1 parent 0044eda commit 5f9c41d

File tree

2 files changed

+27
-3
lines changed

2 files changed

+27
-3
lines changed

src/config/config.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,20 @@ When using `vite` as the `bundler`, in addition to customizing the [rollup-plugi
103103

104104
## appConfig
105105

106-
- **Type**: `object`
107-
- **Default**: `{ globalName: 'LOCAL_CONFIG' }`
106+
- **类型**`object`
107+
- **默认值**`{ globalName: 'LOCAL_CONFIG', obfuscator: false }`
108+
109+
### obfuscator
110+
111+
- **类型**`boolean`
112+
- **默认值**`false`
113+
114+
Whether to obfuscate `config.local.js`. When set to `true`, the generated config file is processed with [javascript-obfuscator](https://github.com/javascript-obfuscator/javascript-obfuscator).
115+
116+
### globalName
117+
118+
- **类型**`string`
119+
- **默认值**`LOCAL_CONFIG`
108120

109121
Supports custom global variable names, allowing users to customize the name of the configuration object on the `window`, with the default value being `LOCAL_CONFIG`.
110122

src/zh/config/config.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,19 @@ export default {
112112
## appConfig
113113

114114
- **类型**`object`
115-
- **默认值**`{ globalName: 'LOCAL_CONFIG' }`
115+
- **默认值**`{ globalName: 'LOCAL_CONFIG', obfuscator: false }`
116+
117+
### obfuscator
118+
119+
- **类型**`boolean`
120+
- **默认值**`false`
121+
122+
是否开启 `config.local.js` 混淆。当设置为 `true` 时,会对生成的配置文件进行混淆处理,借助了 [javascript-obfuscator](https://github.com/javascript-obfuscator/javascript-obfuscator) 实现此功能。
123+
124+
### globalName
125+
126+
- **类型**`string`
127+
- **默认值**`LOCAL_CONFIG`
116128

117129
支持自定义全局变量名称,允许用户自定义配置对象在 `window` 上的名称,默认值为 `LOCAL_CONFIG`
118130

0 commit comments

Comments
 (0)