Skip to content

Commit

Permalink
Cloudflare support
Browse files Browse the repository at this point in the history
  • Loading branch information
AlemTuzlak committed Nov 23, 2024
1 parent 7f1966d commit f036f49
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -136,3 +136,4 @@ dist
# IDE
.idea
.tsup
.react-router
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,20 @@ export default defineConfig({

That's it, you're done!

### CloudFlare

If you're trying to spin it up on CF, try adding this to your `optimizeDeps` in your `vite.config.js` file:
```ts
optimizeDeps: {
include: [
// other optimized deps
"beautify",
"react-diff-viewer-continued",
"classnames",
"@bkrem/react-transition-group",
],
},
```

## Support

Expand Down
15 changes: 15 additions & 0 deletions docs/posts/main/started/installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,21 @@ export default defineConfig({
Make sure your plugin is BEFORE the react router one!
</Warn>

### CloudFlare

If you're trying to spin it up on CF, try adding this to your `optimizeDeps` in your `vite.config.js` file:
```ts
optimizeDeps: {
include: [
// other optimized deps
"beautify",
"react-diff-viewer-continued",
"classnames",
"@bkrem/react-transition-group",
],
},
```

**That's it!**

You should now see the React Router Devtools in your browser when you run your app.
2 changes: 1 addition & 1 deletion test-apps/react-router-vite/app/routes.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@

import { flatRoutes } from "@react-router/fs-routes";
export const routes = flatRoutes()
export default flatRoutes()

0 comments on commit f036f49

Please sign in to comment.