feat: 改为使用webpack.alias配置vue-i18n

This commit is contained in:
万纯 2021-01-14 20:14:49 +08:00
parent e43ea5e56c
commit 05bb37c484
3 changed files with 6 additions and 2 deletions

View File

@ -9,6 +9,10 @@ export default (api) => {
utils: { Mustache }
} = api;
api.chainWebpack((memo) => {
memo.resolve.alias.set('vue-i18n', 'vue-i18n/dist/vue-i18n.esm-bundler.js');
});
api.describe({
key: 'locale',
config: {

View File

@ -6,7 +6,7 @@
// 其他插件可以运行时修改配置
// 所有插件使用一个语言和配置
import { isRef } from 'vue';
import { createI18n, useI18n } from 'vue-i18n/dist/vue-i18n.esm-bundler.js';
import { createI18n, useI18n } from 'vue-i18n';
import { plugin, ApplyPluginsType } from "@@/core/coreExports";
import SelectLang from "./views/SelectLang";

View File

@ -22,7 +22,7 @@ import Menu from 'ant-design-vue/lib/menu';
import 'ant-design-vue/lib/dropdown/style';
import 'ant-design-vue/lib/menu/style';
import { GlobalOutlined } from '@ant-design/icons-vue';
import { useI18n } from 'vue-i18n/dist/vue-i18n.esm-bundler';
import { useI18n } from 'vue-i18n';
import { computed } from 'vue';
import langUConfigMap from '../langUConfigMap';