Skip to content

Commit

Permalink
docs: Add note on dynaimc imports
Browse files Browse the repository at this point in the history
  • Loading branch information
rschristian committed Dec 30, 2024
1 parent 66bdeec commit 95327c0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ export async function prerender() {
}
```

> **Note**: Anything you want to be server-only, like `parseLinks` from the example above, should be dynamically imported in the prerender function. A static import will see that code included in your client bundle, inflating it for a code path that will never run.
## Licenses

[MIT](https://github.com/rschristian/vite-prerender-plugin/blob/master/LICENSE)
Expand Down

0 comments on commit 95327c0

Please sign in to comment.