Adds example on using the Local API (both fetching data and modifying
data) with Remix.
https://github.com/user-attachments/assets/fe215e4e-e446-4f92-b0ac-acbf3d0a225b
This is achieved through the monorepo:
```
website/
payload/
```
You can import the Payload config and types like this:
86d83216d7/examples/remix/website/app/routes/_index.tsx (L1-L16)
34 lines
784 B
JSON
34 lines
784 B
JSON
{
|
|
"include": [
|
|
"**/*.ts",
|
|
"**/*.tsx",
|
|
"**/.server/**/*.ts",
|
|
"**/.server/**/*.tsx",
|
|
"**/.client/**/*.ts",
|
|
"**/.client/**/*.tsx"
|
|
],
|
|
"compilerOptions": {
|
|
"lib": ["DOM", "DOM.Iterable", "ES2022"],
|
|
"types": ["@remix-run/node", "vite/client"],
|
|
"isolatedModules": true,
|
|
"esModuleInterop": true,
|
|
"jsx": "react-jsx",
|
|
"module": "ESNext",
|
|
"moduleResolution": "Bundler",
|
|
"resolveJsonModule": true,
|
|
"target": "ES2022",
|
|
"strict": true,
|
|
"allowJs": true,
|
|
"skipLibCheck": true,
|
|
"forceConsistentCasingInFileNames": true,
|
|
"baseUrl": ".",
|
|
"paths": {
|
|
"~/*": ["./app/*"],
|
|
"react": [ "./node_modules/@types/react" ]
|
|
},
|
|
|
|
// Vite takes care of building everything, not tsc.
|
|
"noEmit": true
|
|
}
|
|
}
|