feat: Update build scripts and configurations for client and server environments

This commit is contained in:
2026-01-05 22:54:49 +07:00
parent 0042fd1951
commit 92608b52e2
5 changed files with 34 additions and 23 deletions

View File

@@ -40,16 +40,24 @@ export default defineConfig((env) => {
// cloudflare(),
],
environments: {
ssr: {
build: {
outDir: "dist/server",
copyPublicDir: false,
rollupOptions: {
input: { index: "/src/index.tsx" },
client: {
build: {
outDir: "dist/client",
rollupOptions: {
input: { index: "/src/client.ts" },
},
}
},
server: {
build: {
outDir: "dist/server",
copyPublicDir: false,
rollupOptions: {
input: { index: "/src/index.tsx" },
},
},
},
},
},
resolve: {
alias: {
"@": path.resolve(__dirname, "./src"),