vue-i18n警告

vue3引入vue-i18n警告:

bundler build of vue-i18n. It is recommended to configure your bundler to explicitly replace feature flag globals with boolean literals to get proper tree-shaking in the final bundle.

vue-i18n版本"vue-i18n": "^9.1.9",

import { createI18n } from 'vue-i18n';
// 改成
import { createI18n } from 'vue-i18n/dist/vue-i18n.cjs.js';
posted @ 2022-09-28 16:59  梦羽微澜  阅读(224)  评论(0编辑  收藏  举报