Replies: 1 comment
-
|
Alright! I found the problem! All solved!
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment


Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone 🤗
I'm migrating an app from a Remix + Cloudflare single app to a Remix monorepo using Turborepo and Cloudflare.
But Wrangler isn't picking up the built remix app. It's returning me 404 on all of my routes.
Note that this exact configuration was working in the single repo configuration.
My journey so far
Strange thing
Remix and Vite don't create an index.html file when they finish the build process. If I create an empty index.html, the wrangler picks it up and returns it to me.
Here are the support files:
(apps/alertdown/package.json)
{ "name": "@alertdown/app", "private": true, "sideEffects": false, "type": "module", "scripts": { "build": "remix vite:build", "dev": "remix vite:dev", "lint": "eslint --ignore-path .gitignore --cache --cache-location ./node_modules/.cache/eslint .", "start": "dotenv wrangler pages dev ./build/client", "tsc": "tsc --noEmit", "extract": "lingui extract --clean", "compile": "lingui compile", "w:deploy": "npm run build && wrangler pages deploy ./build/client --project-name=alertdown", "w:deploy:prod": "npm run build && wrangler pages deploy ./build/client --project-name=alertdown --branch=production", "preview": "npm run build && wrangler pages dev ./build/client", "build-cf-types": "wrangler types", "icons": "npx @svgr/cli --ext=jsx --out-dir app/assets/generated/icons -- app/assets/icons", "icons:watch": "npm-watch icons", "stripe:webhook": "stripe listen --forward-to http://localhost:5173/api/webhooks/stripe", "analyze": "vite-bundle-visualizer" }, "dependencies": { "@alertdown/auth": "workspace:*", "@alertdown/configs": "workspace:*", "@alertdown/core": "workspace:*", "@alertdown/db": "workspace:*", "@alertdown/email": "workspace:*", "@alertdown/storage": "workspace:*", "@alertdown/stripe": "workspace:*", "@remix-run/node": "^2.11.1", "@remix-run/react": "^2.11.1", "@remix-run/serve": "^2.11.1", "isbot": "^5.1.14", "react": "^18.3.1", "react-dom": "^18.3.1", "vite-plugin-commonjs": "^0.10.1", "vite-tsconfig-paths": "^5.0.1" }, "devDependencies": { "@remix-run/dev": "^2.11.1", "@types/react": "^18.3.3", "@types/react-dom": "^18.3.0", "@vitejs/plugin-react": "^4.3.1", "@vitest/coverage-v8": "^2.0.5", "@vitest/ui": "^2.0.5", "eslint": "^9.9.0", "fluid-tailwind": "^1.0.3", "prettier": "^3.3.3", "typescript": "~5.5.4", "vite": "^5.4.0", "vite-plugin-babel-macros": "^1.0.6", "vite-plugin-dts": "~4.0.2", "vitest": "^2.0.5", "wrangler": "^3.71.0" }, "engines": { "node": "20" } }{ "$schema": "https://turbo.build/schema.json", "tasks": { "build": { "dependsOn": ["^build"], "outputs": ["dist/**"] }, "dev": { "cache": false }, "preview": {} } }wrangler.toml
Vite config:
tsconfig.json
{ "$schema": "https://json.schemastore.org/tsconfig", "include": [ "**/*.ts", "**/*.tsx", "**/.server/**/*.ts", "**/.server/**/*.tsx", "**/.client/**/*.ts", "**/.client/**/*.tsx" ], "compilerOptions": { "lib": ["DOM", "DOM.Iterable", "ES2022"], "isolatedModules": true, "esModuleInterop": true, "jsx": "react-jsx", "module": "ESNext", "moduleResolution": "Bundler", "resolveJsonModule": true, "target": "ES2022", "strict": true, "allowJs": true, "forceConsistentCasingInFileNames": true, "baseUrl": ".", "experimentalDecorators": true, "emitDecoratorMetadata": true, // Remix takes care of building everything in `remix build`. "noEmit": true, "types": ["@remix-run/cloudflare", "vite/client"], "skipLibCheck": true } }Any ideas?
Beta Was this translation helpful? Give feedback.
All reactions