mirror of
https://github.com/cline/cline.git
synced 2025-06-03 03:59:07 +00:00
60 lines
1.3 KiB
TypeScript
60 lines
1.3 KiB
TypeScript
/// <reference types="vitest/config" />
|
|
|
|
import { defineConfig } from "vite"
|
|
import tailwindcss from "@tailwindcss/vite"
|
|
import react from "@vitejs/plugin-react-swc"
|
|
import { resolve } from "path"
|
|
|
|
export default defineConfig({
|
|
plugins: [react(), tailwindcss()],
|
|
test: {
|
|
environment: "jsdom",
|
|
globals: true,
|
|
setupFiles: ["./src/setupTests.ts"],
|
|
coverage: {
|
|
provider: "v8",
|
|
reportOnFailure: true,
|
|
},
|
|
},
|
|
build: {
|
|
outDir: "build",
|
|
rollupOptions: {
|
|
output: {
|
|
inlineDynamicImports: true,
|
|
entryFileNames: `assets/[name].js`,
|
|
chunkFileNames: `assets/[name].js`,
|
|
assetFileNames: `assets/[name].[ext]`,
|
|
},
|
|
},
|
|
chunkSizeWarningLimit: 100000,
|
|
},
|
|
server: {
|
|
port: 25463,
|
|
hmr: {
|
|
host: "localhost",
|
|
protocol: "ws",
|
|
},
|
|
cors: {
|
|
origin: "*",
|
|
methods: "*",
|
|
allowedHeaders: "*",
|
|
},
|
|
},
|
|
define: {
|
|
"process.env": {
|
|
NODE_ENV: JSON.stringify(process.env.IS_DEV ? "development" : "production"),
|
|
IS_DEV: JSON.stringify(process.env.IS_DEV),
|
|
IS_TEST: JSON.stringify(process.env.IS_TEST),
|
|
},
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
"@": resolve(__dirname, "./src"),
|
|
"@components": resolve(__dirname, "./src/components"),
|
|
"@context": resolve(__dirname, "./src/context"),
|
|
"@shared": resolve(__dirname, "../src/shared"),
|
|
"@utils": resolve(__dirname, "./src/utils"),
|
|
},
|
|
},
|
|
})
|