Skip to content
This repository has been archived by the owner on Jul 16, 2020. It is now read-only.

ReferenceError: Laravel is not defined #65

Closed
VConsulting opened this issue Oct 24, 2018 · 2 comments
Closed

ReferenceError: Laravel is not defined #65

VConsulting opened this issue Oct 24, 2018 · 2 comments

Comments

@VConsulting
Copy link

Hello,

The explanation on UMD module is not very clear to me.
I did not quite understand the utility?

I also have the following error:
(View.config.lang = Laravel.language)

ReferenceError: Laravel is not defined

Thank you

@martinlindhe
Copy link
Owner

The --umd option wraps the output as a Universal Module Definition.

ReferenceError: Laravel is not defined

See the readme for usage examples.

@zhengfen
Copy link

zhengfen commented Sep 5, 2019

I am too late to join the discussion, but maybe this answer can help someone.
the example of --umd is outdated, here is the code works for me:
with "vue-i18n": "^8.12.0",

import VueInternationalization from 'vue-i18n';
Vue.use(VueInternationalization);
// import Locale from './vue-i18n-locales.generated.js';
const lang = document.documentElement.lang.substr(0, 2);
const i18n = new VueInternationalization({
locale: lang,
messages: window.vuei18nLocales,
silentTranslationWarn: process.env.NODE_ENV === 'production'
});

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants