39 lines
860 B
TypeScript
39 lines
860 B
TypeScript
import path from "node:path";
|
|
import { fileURLToPath } from "node:url";
|
|
|
|
import react from "@vitejs/plugin-react";
|
|
import { defineConfig } from "vite";
|
|
|
|
const rootDir = fileURLToPath(new URL(".", import.meta.url));
|
|
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
resolve: {
|
|
alias: [
|
|
{
|
|
find: "@/env",
|
|
replacement: path.resolve(rootDir, "src/env.ts"),
|
|
},
|
|
{
|
|
find: "next/navigation",
|
|
replacement: path.resolve(rootDir, "src/shims/next-navigation.ts"),
|
|
},
|
|
{
|
|
find: "next/link",
|
|
replacement: path.resolve(rootDir, "src/shims/next-link.tsx"),
|
|
},
|
|
{
|
|
find: "@vite",
|
|
replacement: path.resolve(rootDir, "src"),
|
|
},
|
|
{
|
|
find: "@",
|
|
replacement: path.resolve(rootDir, "src"),
|
|
},
|
|
],
|
|
},
|
|
server: {
|
|
port: 5173,
|
|
},
|
|
});
|