38 lines
821 B
TypeScript
38 lines
821 B
TypeScript
import { defineConfig } from "@solidjs/start/config";
|
|
import tailwindcss from "@tailwindcss/vite";
|
|
import path from "node:path";
|
|
import { fileURLToPath } from "node:url";
|
|
import { type InlineConfig } from "vite";
|
|
|
|
const __filename = fileURLToPath(import.meta.url);
|
|
const __dirname = path.dirname(__filename);
|
|
|
|
const app = defineConfig({
|
|
middleware: "src/middleware/index.ts",
|
|
vite: {
|
|
plugins: [tailwindcss()],
|
|
resolve: {
|
|
alias: {
|
|
"@": path.resolve(__dirname, "./src"),
|
|
},
|
|
},
|
|
build: {
|
|
chunkSizeWarningLimit: 1000,
|
|
assetsInlineLimit: 1024 * 1024,
|
|
},
|
|
dev: {
|
|
chunkSizeWarningLimit: 1000,
|
|
},
|
|
} as InlineConfig,
|
|
});
|
|
|
|
app.addRouter({
|
|
name: "hono",
|
|
type: "http",
|
|
base: "/api/hono",
|
|
handler: "./src/hono.ts",
|
|
worker: true,
|
|
});
|
|
|
|
export default app;
|