vite-plugins-vue-i18n will listens for changes to all .json files
Reporting a bug?
When I use the vite-plugins-vue-i18n plugin, it listens for changes to all the .json files in the project and causes vite to keep reloading
Expected behavior
should only listen to the directory specified by the include parameter
Reproduction
// vite.config.js
import path from 'path'
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import vueI18n from '@intlify/vite-plugin-vue-i18n'
export default defineConfig({
plugins: [
vue(), // you need to install `@vitejs/plugin-vue`
vueI18n({
// if you want to use Vue I18n Legacy API, you need to set `compositionOnly: false`
// compositionOnly: false,
// you need to set i18n resource including paths !
include: path.resolve(__dirname, './path/to/src/locales/**')
})
]
})
// main.js
// When I import this line of code, the problem arises
import messages from '@intlify/vite-plugin-vue-i18n/messages'
Issue Package
vite-plugin-vue-i18n
System Info
windows 10
Screenshot

Additional context
No response
Validations
- [x] Read the Contributing Guidelines.
- [X] Read the README
- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- [X] Check that this is a concrete bug. For Q&A open a GitHub Discussion.
it also doesn't listen for languages in node_modules.
VueI18n({
include: [
resolve(__dirname, '../../node_modules/@oku/i18n/src/locales/**'),
],
}),
how to listen ?
unplugin-vue-i18n the same problem occurs.

@kazupon Any updates on this one?
If you would use to possible, I recommend to use unplugin-vue-i18n.
vite-plugin-vue-i18n only supports up to Vite 3, support security fix only.
unplugin-vue-i18n is going to official v1 release, when nuxt i18n module will have been released near the future. (unplugin-vue-i18n is currently under development with me along with use cases for the nuxt i18n module)
@kazupon I do use unplugin-vue-i18n.
And the problem is that it also listens to changes of all .json files in the project's folder.
Even when include option contains only locales folder.
How can it be fixed?
@kazupon I do use
unplugin-vue-i18n. And the problem is that it also listens to changes of all.jsonfiles in the project's folder. Even whenincludeoption contains onlylocalesfolder. How can it be fixed?
@kazupon I have the same problem,until now there is no solution, the same is used unplugin-vue-i18n .