Files
nage/vite.config.ts
T

30 lines
707 B
TypeScript

import { fileURLToPath, URL } from "node:url";
import solidPlugin from "vite-plugin-solid";
import { defineConfig, type Plugin } from "vitest/config";
import middleware from "#/engine/dev/server/middleware.ts";
export const host = "localhost";
export const port = 3080;
export const root = fileURLToPath(new URL("./", import.meta.url));
function devTools(): Plugin {
return {
name: "dev-tools",
configureServer(server) {
server.middlewares.use("/api", middleware);
},
};
}
export default defineConfig({
server: { host, port, hmr: false },
build: { target: "esnext" },
test: { environment: "jsdom" },
plugins: [solidPlugin(), devTools()],
resolve: {
alias: {
"#/": root,
},
},
});