配置
import { createSSRApp } from "vue";
import App from "./App.vue";
// import createGlobal from '@/global'
import '@/static/index.css'
import {createI18n} from "vue-i18n";
const messages = {
en: {
message: {
hello: 'hello world'
}
},
ja: {
message: {
hello: 'こんにちは、世界'
}
}
}
const i18n = createI18n({
locale: 'ja',
fallbackLocale: 'en',
messages,
})
export function createApp() {
const app = createSSRApp(App);
app.use(i18n)
// app.use(createGlobal)
return {
app,
};
}
i18n 版本 "vue-i18n": "^9.2.2"
运行时出现
caught SyntaxError: The requested module '/node_modules/vue-i18n/dist/vue-i18n.cjs.js?v=fee5aa0c' does not provide an export named 'createI18n'
1 个回复
Diligent_UI - 【插件开发】【专治疑难杂症】【多款插件已上架:https://ext.dcloud.net.cn/publisher?id=193663(微信搜索飘逸科技UI小程序直接体验)】【骗子请绕道】问题咨询请加QQ群:120594820,代表作灵感实用工具小程序
首先得npm安装vue-i18模块啊