Skip to content

Commit

Permalink
Adds visibility "best practice" prerender_component documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
dgp1130 committed Jul 23, 2023
1 parent 6042e5a commit 5330387
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,13 @@ and has a few special rules for how it is used.
* Acts as a guardrail to make it less likely to run afoul of the above
rules.

A general best practice is to give every `prerender_component` target its own
directory and Bazel package. Leave everything private visibility except for the
`prerender_component` target itself. This will set visibility for the alias
targets as well. Doing so makes it impossible to accidentally forget to use the
component aliases, since doing so would be a visibility error. This pattern
helps you naturally follow the above rules without even thinking about it.

### Generating multiple pages

We can generate multiple pages just as easily as the one. We just need to yield
Expand Down

0 comments on commit 5330387

Please sign in to comment.