Integrating vue-i18n or other modules into NOVA's app.js
Hi there, I've got a small problem regarding the integration of custom stuff into my app.js
My main problem with this topic is, that I am not sure if my app.js file(s) are actually compiled to the public folder.
After successfully installing the following packages:
https://github.com/voicecode-bv/laravel-nova-translation-manager https://github.com/martinlindhe/laravel-vue-i18n-generator
I tried to add the following code into resources/js/app.js to include the vue-i18n library to the application:
import VueInternationalization from 'vue-i18n';
import Locale from './vue-i18n-locales.generated.js';
Vue.use(VueInternationalization);
const lang = "en";// document.documentElement.lang.substr(0, 2); todo make this dynamic
const i18n = new VueInternationalization({
locale: lang,
messages: Locale
});
then I ran /var/www/npm run dev and either /var/ww/npm run watch to recompile the public/js/app.js.
Actually, I can now find this in that file, but it seems only public/vendor/nova/app.js is loaded instead.
Can someone explain to me what I am doing wrong, or where you would put the lines above so they can be used in my nova application?
I also tried to put my changes in my theme's resources folder a.k.a. nova-components/Mytheme/resources/js/app.js but also there it's not loading.
Any hints?
Thanks, so far.
Please or to participate in this conversation.