mirror of
https://github.com/jakejarvis/sofa.git
synced 2026-08-29 00:25:38 -04:00
36 lines
942 B
TypeScript
36 lines
942 B
TypeScript
import babel from "@rolldown/plugin-babel";
|
|
import tailwindcss from "@tailwindcss/vite";
|
|
import { devtools } from "@tanstack/devtools-vite";
|
|
import { tanstackRouter } from "@tanstack/router-plugin/vite";
|
|
import react, { reactCompilerPreset } from "@vitejs/plugin-react";
|
|
import { defineConfig } from "vite";
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
devtools(),
|
|
tanstackRouter({ target: "react", autoCodeSplitting: true }),
|
|
react(),
|
|
babel({
|
|
presets: [reactCompilerPreset()],
|
|
}),
|
|
tailwindcss(),
|
|
],
|
|
resolve: {
|
|
tsconfigPaths: true,
|
|
},
|
|
server: {
|
|
port: 3000,
|
|
proxy: {
|
|
"/rpc": "http://localhost:3001",
|
|
"/api": "http://localhost:3001",
|
|
"/images": "http://localhost:3001",
|
|
},
|
|
},
|
|
define: {
|
|
__APP_VERSION__: JSON.stringify(process.env.APP_VERSION || "0.0.0"),
|
|
__GIT_COMMIT_SHA__: JSON.stringify(
|
|
(process.env.GIT_COMMIT_SHA || "").slice(0, 7),
|
|
),
|
|
},
|
|
});
|