¿Support for SSR? (Server Side rendering)
See original GitHub issue¿Will SSR be supported?
vue & vue-i18n version
Vue: 2.0.1 vue-i18n: 4.6.0
How i18n is begin applied:
import VueI18n from 'vue-i18n'
Vue.use(VueI18n);
// set locale data
Vue.config.lang = i18nData.language;
Vue.config.fallbackLang = i18nData.language;
Vue.locale(i18nData.language, i18nData.phrases);
// Development options
if (process.env.NODE_ENV == "development") {
// i18n: track missing translations
Vue.config.missingHandler = function (lang, missingPhrase) {
ApiService._call('/translation/add-phrase', {phrase: missingPhrase, locale: lang});
};
}
Error message:
TypeError: Cannot read property ‘dep’ of undefined at getDep (C:\app\node_modules\vue-i18n\dist\vue-i18n.common.js:199:26) at Config (C:\app\node_modules\vue-i18n\dist\vue-i18n.common.js:212:13) at plugin (C:\app\node_modules\vue-i18n\dist\vue-i18n.common.js:946:3) at Function.Vue.use (C:\app\node_modules\vue\dist\vue.common.js:3140:14) at Object.<anonymous> (vue_ssr_bundle:1576:16) at webpack_require (vue_ssr_bundle:21:30) at Object.<anonymous> (vue_ssr_bundle:58:14) at webpack_require (vue_ssr_bundle:21:30) at module.exports.Object.defineProperty.value (vue_ssr_bundle:41:18) at Object.<anonymous> (vue_ssr_bundle:44:10)
Issue Analytics
- State:
- Created 7 years ago
- Reactions:3
- Comments:19 (8 by maintainers)
Top Results From Across the Web
Server-Side Rendering - Vite
Vite provides built-in support for server-side rendering (SSR). The Vite playground contains example SSR setups for Vue 3 and React, which can be...
Read more >Server-Side Rendering (SSR) - Vue.js
Server -rendered markup doesn't need to wait until all JavaScript has been downloaded and executed to be displayed, so your user will see...
Read more >How to Enable Server-Side Rendering for a React App
In this tutorial, you will initialize a React app using Create React App and then modify the project to enable server-side rendering.
Read more >Improve app performance with React server-side rendering
React server-side rendering offers performance benefits vs. client-side rendering. Learn about different React SSR frameworks.
Read more >Server-side rendering - Apollo GraphQL Docs
Server -side rendering (SSR) is a performance optimization for modern web apps. ... You don't need to make any changes to your queries...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Any progress on i18n with SSR?
Ok! I’ll try to ready the Nuxt.js example later! 😉