Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
nksaraf committed Jul 2, 2023
1 parent 1089cb2 commit 75ab81f
Showing 1 changed file with 33 additions and 50 deletions.
83 changes: 33 additions & 50 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,43 +35,35 @@ import reactRefresh from "@vitejs/plugin-react";
import { createApp } from "vinxi";

export default createApp({
bundlers: [
{
name: "static-server",
outDir: "./.build/client",
},
{
name: "node-api",
target: "node",
outDir: "./.build/api",
},
{
name: "client",
target: "browser",
outDir: "./.build/api",
plugins: () => [reactRefresh()],
},
],
routers: [
{
name: "public",
mode: "static",
name: "static",
build: "static-server",
build: {
outDir: "./.build/client",
},
dir: "./public",
base: "/",
},
{
mode: "build",
name: "client",
mode: "build",
handler: "./app/client.tsx",
build: "client",
build: {
target: "browser",
outDir: "./.build/api",
plugins: () => [reactRefresh()],
},
base: "/_build",
},
{
mode: "node-handler",
name: "ssr",
mode: "handler",
handler: "./app/server.tsx",
name: "api",
build: "node-api",
build: {
target: "node",
outDir: "./.build/api",
},
},
],
});
Expand All @@ -84,46 +76,37 @@ import { createApp } from "vinxi";
import solid from "vite-plugin-solid";

export default createApp({
bundlers: [
{
name: "static-server",
outDir: "./.build/client",
},
{
name: "node-api",
target: "node",
outDir: "./.build/api",
plugins: () => [solid({ ssr: true })],
},
{
name: "client",
target: "browser",
outDir: "./.build/api",
plugins: () => [solid({ ssr: true })],
},
],
routers: [
{
name: "public",
mode: "static",
name: "static",
build: "static-server",
build: {
outDir: "./.build/client",
},
dir: "./public",
base: "/",
},
{
mode: "build",
name: "client",
mode: "build",
handler: "./app/client.tsx",
build: "client",
build: {
target: "browser",
outDir: "./.build/api",
plugins: () => [solid({ ssr: true })],
},
base: "/_build",
},
{
mode: "node-handler",
name: "ssr",
mode: "handler",
handler: "./app/server.tsx",
name: "api",
build: "node-api",
build: {
target: "node",
outDir: "./.build/api",
plugins: () => [solid({ ssr: true })],
},
},
],
});

```

0 comments on commit 75ab81f

Please sign in to comment.