This commit is contained in:
gili8420 2026-08-14 00:01:49 +09:00
commit b43955e0d9
162 changed files with 15425 additions and 0 deletions

31
vite.config.js Normal file
View file

@ -0,0 +1,31 @@
import { sveltekit } from '@sveltejs/kit/vite';
import { defineConfig, loadEnv } from 'vite';
import { mockApi } from './mocks/plugin';
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd(), '');
const useMock = env.VITE_USE_MOCK_API === 'true';
return {
plugins: [...(useMock ? [mockApi()] : []), sveltekit()],
css: {
preprocessorOptions: {
scss: {
// Bootstrap 5.3 is still written against the old Sass API, so
// compiling it emits hundreds of warnings we cannot act on.
// Drop the list when Bootstrap ships @use-based sources.
silenceDeprecations: ['import', 'global-builtin', 'color-functions', 'if-function']
}
}
},
server: useMock
? {}
: {
proxy: {
'/api': {
target: env.VITE_API_PROXY_TARGET || 'http://localhost:8000',
changeOrigin: true
}
}
}
};
});