Skip to content

Commit

Permalink
chore: reduce size of imports in readme demos
Browse files Browse the repository at this point in the history
  • Loading branch information
aralroca committed Mar 21, 2024
1 parent 285d1ff commit 9e20229
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@
`prerender-macro` plugin allows to make hybrid pages between dynamic and static components, avoiding the rendering in runtime of the static ones, this rendering is done in build-time thanks to Bun's macros.

```tsx
import StaticComponent from "@/components/static-component" with { type: "prerender" };
import DynamicComponent from "@/components/dynamic-component";
import StaticComponent from "@/static-component" with { type: "prerender" };
import DynamicComponent from "@/dynamic-component";

// ...
return (
Expand All @@ -77,13 +77,13 @@ This plugin transforms the previous code to this code:

```tsx
import { prerender } from "prerender-macro/prerender" with { "type": "macro" };
import DynamicComponent from "@/components/dynamic-component";
import DynamicComponent from "@/dynamic-component";

// ...
return (
<>
{prerender({
componentPath: "@/components/static",
componentPath: "@/static-component",
componentModuleName: "default",
componentProps: { foo: "bar" },
})}
Expand Down

0 comments on commit 9e20229

Please sign in to comment.