feat: add Vite config and TypeScript settings for web build

This commit is contained in:
2026-04-27 08:24:55 +09:00
parent 57d4a9bf17
commit 7e9bc4bfdd
6 changed files with 79 additions and 9 deletions

39
vite.config.ts Normal file
View File

@@ -0,0 +1,39 @@
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
export default defineConfig({
plugins: [
react({
jsxImportSource: '@emotion/react',
babel: {
plugins: ['@emotion/babel-plugin'],
},
}),
],
base: './',
resolve: {
alias: {
'@': '/src',
},
},
server: {
port: 5173,
strictPort: false,
open: true,
},
build: {
outDir: 'dist',
sourcemap: true,
rollupOptions: {
output: {
manualChunks: {
'react-vendor': ['react', 'react-dom'],
'state': ['zustand'],
},
},
},
},
define: {
__APP_VERSION__: JSON.stringify(process.env.npm_package_version),
},
});