Skip to content

Commit d90a69e

Browse files
committed
docs: add vite-env-only callout to server-modules and client-modules
1 parent 4221866 commit d90a69e

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

docs/api/framework-conventions/client-modules.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@ console.log(supportsVibrationAPI);
2626
// client: true | false
2727
```
2828

29+
<docs-info>
30+
31+
If you need more sophisticated control over what is included in the client/server bundles, check out the [`vite-env-only` plugin](https://github.com/pcattori/vite-env-only).
32+
33+
</docs-info>
34+
2935
## Usage Patterns
3036

3137
### Individual Files

docs/api/framework-conventions/server-modules.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ export function validateToken(token: string) {
2121

2222
`.server` modules are a good way to explicitly mark entire modules as server-only. The build will fail if any code in a `.server` file or `.server` directory accidentally ends up in the client module graph.
2323

24+
<docs-info>
25+
26+
If you need more sophisticated control over what is included in the client/server bundles, check out the [`vite-env-only` plugin](https://github.com/pcattori/vite-env-only).
27+
28+
</docs-info>
29+
2430
## Usage Patterns
2531

2632
### Individual Files

0 commit comments

Comments
 (0)