You are running the esm-bundler build of vue-i18n. It is recommended to configure your bundler to...

1. 官网的解答

查看github解答
查看官网文档

2. 在项目中的解决方式

安装 intlify/vite-plugin-vue-i18n

npm install @intlify/vite-plugin-vue-i18n

You are running the esm-bundler build of vue-i18n. It is recommended to configure your bundler to..._第1张图片
然后再 vite.config.js 或者 vite.config.ts 中配置如下
You are running the esm-bundler build of vue-i18n. It is recommended to configure your bundler to..._第2张图片
You are running the esm-bundler build of vue-i18n. It is recommended to configure your bundler to..._第3张图片

你可能感兴趣的:(前端,vue.js,前端,javascript)