intlify / intlify/bundle-tools
vite-plugins-vue-i18n will listens for changes to all .json files
- Dominant language
- TypeScript
- Stars
- 270
- Forks
- 46
- PR merge metrics
- No merged PRs in 30d
Description
### 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
```js
// 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/**')
})
]
})
```
```js
// 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
```shell
windows 10
```
### Screenshot


### Additional context
_No response_
### Validations
- [x] Read the [Contributing Guidelines](https://github.com/intlify/bundle-tools/blob/main/.github/contributing.md).
- [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](https://github.com/intlify/bundle-tools/discussions).
Contributor guide
Assessment
This issue has not been assessed yet.