Skip to content
This repository was archived by the owner on Jul 6, 2025. It is now read-only.

Commit 430f756

Browse files
committed
Add framework plugins
1 parent 11cc6d4 commit 430f756

File tree

35 files changed

+230
-204
lines changed

35 files changed

+230
-204
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
import { bootstrap } from "aleph/react-client";
1+
import { bootstrap } from "aleph/react";
22

33
bootstrap();

examples/github-oauth-middleware/server.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { serve } from "aleph/react-server";
1+
import { serve } from "aleph/server";
2+
import react from "aleph/plugins/react";
23
import unocss from "aleph/plugins/unocss";
34
import presetUno from "@unocss/preset-uno";
45
import { GithubOauth } from "./middlewares/oauth.ts";
@@ -8,6 +9,7 @@ serve({
89
baseUrl: import.meta.url,
910
router: { routes },
1011
plugins: [
12+
react({ ssr: true }),
1113
unocss({
1214
presets: [presetUno()],
1315
}),
@@ -18,5 +20,4 @@ serve({
1820
clientSecret: Deno.env.get("GITHUB_OAUTH_CLIENT_SECRET"),
1921
}),
2022
],
21-
ssr: true,
2223
});

examples/react-app/main.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
import { bootstrap } from "aleph/react-client";
1+
import { bootstrap } from "aleph/react";
22

33
bootstrap();

examples/react-app/server.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
import { serve } from "aleph/react-server";
1+
import { serve } from "aleph/server";
2+
import react from "aleph/plugins/react";
23
import routes from "./routes/_export.ts";
34

45
serve({
56
baseUrl: import.meta.url,
67
router: { routes },
7-
ssr: true,
8+
plugins: [
9+
react({ ssr: true }),
10+
],
811
});

examples/react-mdx-app/main.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
import { bootstrap } from "aleph/react-client";
1+
import { bootstrap } from "aleph/react";
22

33
bootstrap();

examples/react-mdx-app/server.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { serve } from "aleph/react-server";
1+
import { serve } from "aleph/server";
2+
import react from "aleph/plugins/react";
23
import mdx from "aleph/plugins/mdx";
34
import routes from "./routes/_export.ts";
45

@@ -16,7 +17,7 @@ serve({
1617
rehypePlugins: [rehypeHighlight, rehypeSlug],
1718
providerImportSource: "@mdx-js/react",
1819
}),
20+
react({ ssr: true }),
1921
],
2022
router: { routes },
21-
ssr: true,
2223
});
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
import { bootstrap } from "aleph/react-client";
1+
import { bootstrap } from "aleph/react";
22

33
bootstrap();
Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
import { serve } from "aleph/react-server";
1+
import { serve } from "aleph/server";
2+
import react from "aleph/plugins/react";
23
import routes from "./routes/_export.ts";
34

45
serve({
56
baseUrl: import.meta.url,
6-
router: {
7-
routes,
8-
},
9-
ssr: true,
7+
router: { routes },
8+
plugins: [react({ ssr: true })],
109
});

examples/solid-app/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
<body>
1212
<div id="root"></div>
13-
<script type="module" src="./main.tsx"></script>
13+
<script type="module" src="./main.ts"></script>
1414
</body>
1515

1616
</html>
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
import { hydrate } from "solid-js/web";
22

33
const { default: App } = __aleph.getRouteModule("./routes/index.tsx");
4-
hydrate(() => <App />, document.getElementById("root")!);
4+
hydrate(App, document.getElementById("root")!);

0 commit comments

Comments
 (0)