Fix initialization on ui
orblazer opened this issue · comments
orblazer commented
Hello,
When we load UI i don't have locales.
I have investigate on this error and this is because the currentProject
and currentConfig
.
This is caused because when start vue ui
the plugin is not reloaded.
And now i have fix that with write next code in onProjectOpen
const rawConfig = require(`${project.path}/vue.config`)
const config = (rawConfig.pluginOptions && rawConfig.pluginOptions.i18n)
? rawConfig.pluginOptions.i18n
: { localeDir: 'locales' }
if (!config.localeDir) { config.localeDir = 'locales' }
debug('onProjectOpen : load vue.config', config)
setupAddon(project.path, config)
currentProject = project
currentConfig = config
Thanks.
kazuya kawaguchi commented
merged #41