Skip to content

Commit c6b3a77

Browse files
Merge pull request #8 from NJalal7/patch-1
Added pre-rendering note to README.md
2 parents 80992aa + 52005b8 commit c6b3a77

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,6 @@ yarn test
1717
```
1818

1919
For detailed explanation on how things work, checkout the [CLI Readme](https://github.com/developit/preact-cli/blob/master/README.md).
20+
21+
Note: When pre-rendering, your module as components are executed in a Node.js environment, where most Web APIs are not available. To account for this, wrap that code in a check like `if (typeof window !== 'undefined')`.
22+
Do not add `preact build --no-prerender` to the build command as it will prevent blog posts from rendering.

0 commit comments

Comments
 (0)