编译
vsce package
发布
vsce publish
本地国际化配置
package.json
"isI18nLocal": true,
i18n.config.json
{
"projectName": "byteluck-official-website",
"projectCode": "BOW",
// 要扫描的文件夹
"scanFolder": ["components", "pages"],
// 要过滤的文件或文件夹
"ignores": [],
"runEnv": "runtime",
// 要翻译的语言
"languages": [
{"zh-CN": "中文"},
{"en-US": "英文"}
],
// 当不使用默认包时,指定import文件
"fileImport": {
"test": "from\\s+('|\")@/utils/i18n('|\")",
"content": "import { getLocaleText } from '@/utils/i18n'"
},
// 不需要在package.json中添加默认依赖 "@byteluck-fe/locale-message": "^1.0.16"
"notNeedImportPackage": true
}
| |