Skip to content
Source
Sign inSign up
TanStack/router
Open History to see the last commit

server-only.ts

15 lines563 Bytes

1/**
2 * Side-effect-only marker import.
3 *
4 * Usage:
5 * import '@tanstack/react-start/server-only'
6 *
7 * When this import appears in a module, the import-protection plugin marks
8 * that module as server-only. Importing a server-only module from the client
9 * environment will trigger a violation (error or mock depending on config).
10 *
11 * At build time, the plugin intercepts this specifier in `resolveId` and
12 * replaces it with a virtual empty module β€” this source file exists only
13 * so that TypeScript and IDE tooling can resolve the import.
14 */
15export {}