| 1234567891011121314151617181920212223242526272829303132333435363738394041 |
- import path from "path"
- import { defineConfig } from "vite"
- import react from "@vitejs/plugin-react"
- import tailwindcss from "@tailwindcss/vite"
- // https://vitejs.dev/config/
- export default defineConfig({
- plugins: [react(), tailwindcss()],
- resolve: {
- alias: {
- "@": path.resolve(__dirname, "./src"),
- },
- },
- build: {
- outDir: "build",
- reportCompressedSize: false,
- rollupOptions: {
- output: {
- entryFileNames: `assets/[name].js`,
- chunkFileNames: `assets/[name].js`,
- assetFileNames: `assets/[name].[ext]`,
- },
- },
- },
- server: {
- hmr: {
- host: "localhost",
- protocol: "ws",
- },
- cors: {
- origin: "*",
- methods: "*",
- allowedHeaders: "*",
- },
- },
- define: {
- "process.platform": JSON.stringify(process.platform),
- "process.env.VSCODE_TEXTMATE_DEBUG": JSON.stringify(process.env.VSCODE_TEXTMATE_DEBUG),
- },
- })
|