intlify / intlify/bundle-tools

vite:eslint throws error with messages

Open
#2 6 comments 0 reactions 0 assignees View on GitHub
status: review needed
Dominant language
TypeScript
Stars
270
Forks
46
PR merge metrics
No merged PRs in 30d

Description

I add ```eslintPlugin()``` in ```vite.config.js``` as following:
```
export default defineConfig({
plugins: [
vue(),
eslintPlugin({
fix: true,
exclude: path.resolve(__dirname, './src/main.js'), // still throw the error even I excluded main.js from here
}),
vueI18n({
include: path.resolve(__dirname, './src/i18n/**'),
}),
],
});
```

and it throws an error:
```
[vite] Internal server error: No files matching '@intlify/vite-plugin-vue-i18n/messages' were found.
Plugin: vite:eslint
File: @intlify/vite-plugin-vue-i18n/messages
```

Here's my ```main.js```:
```
import { createApp } from 'vue';
import { createI18n } from 'vue-i18n';
import messages from '@intlify/vite-plugin-vue-i18n/messages';
import App from './App.vue';

const i18n = createI18n({
messages,
});

createApp(App).use(i18n).mount('#app');
```

Note: Removing ```eslintPlugin()``` from ```vite.config.js``` would get rid of the error, but I do want to keep EsLint functionality though...

I'm not sure this is caused by ```vite-plugin-eslint``` or ```vite-plugin-vue-i18n```. Let me know if I should turn it to ```vite-plugin-eslint``` instead.

Versions:
- vite: ^2.3.3
- vite-plugin-vue-i18n: ^2.1.2
- vite-plugin-eslint: ^1.1.0
- eslint: ^7.27.0

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.