2026-03-09 00:50:24 +02:00
|
|
|
import { defineConfig } from "vite";
|
|
|
|
|
import react from "@vitejs/plugin-react-swc";
|
|
|
|
|
import tailwindcss from "@tailwindcss/vite";
|
|
|
|
|
import tanstackRouter from "@tanstack/router-plugin/vite";
|
|
|
|
|
import { devtools as tanstackDevtools } from "@tanstack/devtools-vite";
|
2026-03-07 21:44:42 +02:00
|
|
|
|
|
|
|
|
export default defineConfig({
|
2026-03-09 00:50:24 +02:00
|
|
|
plugins: [
|
|
|
|
|
tanstackDevtools({
|
|
|
|
|
removeDevtoolsOnBuild: true,
|
|
|
|
|
logging: true,
|
|
|
|
|
injectSource: {
|
|
|
|
|
enabled: true,
|
|
|
|
|
},
|
|
|
|
|
editor: {
|
|
|
|
|
name: "WebStorm",
|
|
|
|
|
open: async (path, lineNumber, columnNumber) => {
|
|
|
|
|
const { exec } = await import("node:child_process");
|
|
|
|
|
exec(
|
|
|
|
|
`webstorm -g "${path.replaceAll("$", "\\$")}${lineNumber ? `:${lineNumber}` : ""}${columnNumber ? `:${columnNumber}` : ""}"`,
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
enhancedLogs: {
|
|
|
|
|
enabled: true,
|
|
|
|
|
},
|
|
|
|
|
}),
|
|
|
|
|
tanstackRouter({
|
|
|
|
|
target: "react",
|
|
|
|
|
autoCodeSplitting: true,
|
|
|
|
|
}),
|
|
|
|
|
react(),
|
|
|
|
|
tailwindcss(),
|
|
|
|
|
],
|
|
|
|
|
});
|