You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’ve implemented Vue 3 with Vite and integrated vue-i18n for internationalization . Everything works perfectly in my local development environment, including language files and I18n functionality, without any errors.
However, when I deploy the project to the server and run yarn build, the build process completes without any issues, but when I load the app in the browser, I encounter several errors. The errors include multiple instances of the following:
SyntaxError: 23 (at @intlify-2rgc3MTt.js:sourcemap:112:17) at createCompileError (@intlify-2rgc3MTt.js:sourcemap:112:17) at createCoreError (@intlify-2rgc3MTt.js:sourcemap:1646:10) at resolveLocale (@intlify-2rgc3MTt.js:sourcemap:1669:13) at getLocale (@intlify-2rgc3MTt.js:sourcemap:1649:67) at translate (@intlify-2rgc3MTt.js:sourcemap:2657:18) at vue-i18n.mjs:517:48 at wrapWithDeps (vue-i18n.mjs:462:19) at Proxy.t (vue-i18n.mjs:517:16) at Header.vue:413:3 at Object.renderFnWithContext [as default] (runtime-core.esm-bundler.js:694:13)
I have followed all necessary steps, including adding the vue-i18n plugin to vite.config.js, configuring language files correctly, and optimizing the build process by turning off minification and enabling sourcemaps for debugging.
The project works without issues locally but doesn’t function correctly when deployed on the server.
Any insights or suggestions would be highly appreciated.
This message explains the problem clearly and provides the context that everything works locally but breaks on the server.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I’ve implemented Vue 3 with Vite and integrated vue-i18n for internationalization . Everything works perfectly in my local development environment, including language files and I18n functionality, without any errors.
However, when I deploy the project to the server and run yarn build, the build process completes without any issues, but when I load the app in the browser, I encounter several errors. The errors include multiple instances of the following:
SyntaxError: 23 (at @intlify-2rgc3MTt.js:sourcemap:112:17) at createCompileError (@intlify-2rgc3MTt.js:sourcemap:112:17) at createCoreError (@intlify-2rgc3MTt.js:sourcemap:1646:10) at resolveLocale (@intlify-2rgc3MTt.js:sourcemap:1669:13) at getLocale (@intlify-2rgc3MTt.js:sourcemap:1649:67) at translate (@intlify-2rgc3MTt.js:sourcemap:2657:18) at vue-i18n.mjs:517:48 at wrapWithDeps (vue-i18n.mjs:462:19) at Proxy.t (vue-i18n.mjs:517:16) at Header.vue:413:3 at Object.renderFnWithContext [as default] (runtime-core.esm-bundler.js:694:13)
The project works without issues locally but doesn’t function correctly when deployed on the server.
Any insights or suggestions would be highly appreciated.
This message explains the problem clearly and provides the context that everything works locally but breaks on the server.
Beta Was this translation helpful? Give feedback.
All reactions