Module is a CommonJS module, which may not support all module.exports as named exports. #635
Unanswered
alivadjid
asked this question in
Help & Questions
Replies: 2 comments 7 replies
-
我也遇见类似的问题,我是在项目中集成了
|
Beta Was this translation helpful? Give feedback.
3 replies
-
Have you tried the suggested solution? import pkg from 'vue-i18n/dist/vue-i18n.runtime.esm-bundler.js';
const { createI18n, useI18n } = pkg; |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
Hello!
I'm using vite-ssr-plugin with vue3 and i18n with unplugin-vue-i18n
On build mode I have an error. But on dev mode everything is great.
Found this comment about this problem, intlify/vue-i18n#1131 (comment)
And explanation vuejs/core#4814 (comment)
Also there are solution for vite-plugin-vue-i18n intlify/bundle-tools#172
But I can't find solutions for unplugin-vue-i18n
Also opened issue in repo unplugin-vue-i18n, intlify/bundle-tools#220
If change ssr parameter in vite.config.ts - building is successfull
My vite.config.ts
Here how i18n is used in app.ts
package.json
Error Message + Error Stack
Beta Was this translation helpful? Give feedback.
All reactions