Vite (or one of its plugins) is trying to read a svelte.config.js file that I’ve never used, even though my Svelte configuration is inside vite.config.js.
❯ bun dev
$ vite --host
Error reading svelte.config.js
VITE v5.3.3 ready in 603 ms
➜ Local: http://localhost:5173/
➜ Network: http://192.168.68.102:5173/
➜ press h + enter to show help
vite.config.js
import { defineConfig } from 'vite'
import { svelte } from '@sveltejs/vite-plugin-svelte'
import autoImport from 'sveltekit-autoimport'
import path from 'path'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
autoImport({
components: [
{name: './src/components/containers', flat: true},
{name: './src/components/displays', flat: true},
{name: './src/components/files', flat: true},
{name: './src/components/inputs', flat: true},
{name: './src/views', flat: true},
'./src/components',
],
module: {
'svelte-apollo': ['mutation'],
'svelte/transition': ['fly', 'fade'],
svelte: ['onMount', 'setContext', 'getContext', 'createEventDispatcher']
},
}),
svelte({
onwarn(warning, defaultHandler) {
if (warning.code.startsWith('a11y-')) return;
// handle all other warnings normally
defaultHandler(warning)
}
})
],
resolve: {
alias: {
lib: path.resolve('./src/lib'),
store: path.resolve('./src/store'),
queries: path.resolve('./src/queries')
}
},
base: './'
})
All my packages are updated. However, I don’t know why I still get that error if I really (I think) I don’t need that file. Any help will be really appreciated.