webpack-gc-i18n-plugin 1.1.13 → 1.1.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/customLoader/index.cjs +69 -27
- package/dist/customLoader/index.cjs.map +1 -1
- package/dist/customLoader/index.mjs +69 -27
- package/dist/customLoader/index.mjs.map +1 -1
- package/dist/index.cjs +73 -29
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +10 -9
- package/dist/index.mjs +72 -30
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/readme.md +3 -2
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -332,6 +332,9 @@ import '../lang/index.js' // 📍 必须在入口文件中第一行引入,文
|
|
|
332
332
|
|
|
333
333
|
## ⚙️ 配置参数说明
|
|
334
334
|
|
|
335
|
+
语言项无需配置。插件固定使用 `zh-cn` 作为源语言、`zh-tw` 作为目标语言,传入的
|
|
336
|
+
`originLang`、`targetLangList` 或 `langKey` 会被忽略。
|
|
337
|
+
|
|
335
338
|
| 参数 | 类型 | 必选 | 默认值 | 描述 |
|
|
336
339
|
| -------------------- | ---------- | ---- | ------------------------ | ------------------------------------------------------------------------------------------- |
|
|
337
340
|
| enabled | boolean | ❌ | `true` | 是否触发翻译。 |
|
|
@@ -345,8 +348,6 @@ import '../lang/index.js' // 📍 必须在入口文件中第一行引入,文
|
|
|
345
348
|
| distPath | string | ✅ | `''` | 打包后生成的文件位置路径 |
|
|
346
349
|
| distKey | string | ✅ | `'index'` | 打包后生成的翻译主文件名称 |
|
|
347
350
|
| namespace | string | ✅ | `lang` | 项目命名空间,用于区分不同项目的翻译配置 |
|
|
348
|
-
| originLang | string | ✅ | `'zh-cn'` | 源语言,翻译以此语言为基础 |
|
|
349
|
-
| targetLangList | string[] | ✅ | `['en']` | 目标语言列表,支持配置多个语言 |
|
|
350
351
|
| buildToDist | boolean | ❌ | `false` | 是否在构建结束后将最新的翻译文件打包到主包中,默认不打包 |
|
|
351
352
|
| translator | Translator | ❌ | `GoogleTranslator` | 翻译器实例 |
|
|
352
353
|
| translatorOption | object | ❌ | `{}` | 翻译器的配置项,优先级低于`translator` |
|