mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-09-05 08:10:14 +00:00
* Initial webview vite migration * Make vite work * Fix test running * Enable HMR, disable vite chunking * Silence type checking errors * Vite doesn't use browserslist * get rid of breaking css flag * add doc to getHMRHtmlContent * Make it work * Changeset * Add IS_DEV to env definitions * Update tasks to include HMR * Update CSP image rules * prettier * reintroduce IS_DEV in env * add new deps to pkg lock --------- Co-authored-by: Dennis Bartlett <bartlett.dc.1@gmail.com>
43 lines
857 B
TypeScript
43 lines
857 B
TypeScript
/// <reference types="vitest/config" />
|
|
|
|
import { defineConfig } from "vite"
|
|
import react from "@vitejs/plugin-react-swc"
|
|
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
test: {
|
|
environment: "jsdom",
|
|
globals: true,
|
|
setupFiles: ["./src/setupTests.ts"],
|
|
},
|
|
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),
|
|
},
|
|
},
|
|
})
|