martinlindhe / laravel-vue-i18n-generator

Generates a vue-i18n compatible include file from your Laravel translations
MIT License
306 stars 207 forks source link

Issue with array since npm upgrade #103

Closed lk77 closed 4 years ago

lk77 commented 4 years ago

Hello,

since upgrade i have an issue with array beeing transformed in associative objects without any reason.

file en.js Screenshot from 2019-12-31 09-17-30 console.log of window.vuei18nLocales Screenshot from 2019-12-31 09-17-07

do you have any idea why ?

the factory() function is returning an array, but it becomes and object somehow

Screenshot from 2019-12-31 09-27-59

edit :it does not seems related directly to this package. The generated files are correct. it seems related to vue-i18n directly. if i replace messages: window.vuei18nLocales by messages: JSON.parse(JSON.stringify(window.vuei18nLocales)) the vuei18nLocales property of window object is not modified and array is still an array.

thanks.