-
Notifications
You must be signed in to change notification settings - Fork 774
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade
remix-pages-app
fixture's Remix version
- Loading branch information
Showing
14 changed files
with
2,122 additions
and
306 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
node_modules | ||
|
||
/.cache | ||
/build | ||
/functions/\[\[path\]\].js | ||
/functions/\[\[path\]\].js.map | ||
/public/build | ||
.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,22 @@ | ||
# Welcome to Remix! | ||
|
||
This is a lightly modified Remix starter (`npx create-remix@latest`) which will let us test changes to wrangler and Pages Functions. | ||
- [Remix Docs](https://remix.run/docs) | ||
|
||
## Development | ||
|
||
You will be utilizing Wrangler for local development to emulate the Cloudflare runtime. This is already wired up in your package.json as the `dev` script: | ||
|
||
```sh | ||
# start the remix dev server and wrangler | ||
npm run dev | ||
``` | ||
|
||
Open up [http://127.0.0.1:8788](http://127.0.0.1:8788) and you should be ready to go! | ||
|
||
## Deployment | ||
|
||
Cloudflare Pages are currently only deployable through their Git provider integrations. | ||
|
||
If you don't already have an account, then [create a Cloudflare account here](https://dash.cloudflare.com/sign-up/pages) and after verifying your email address with Cloudflare, go to your dashboard and follow the [Cloudflare Pages deployment guide](https://developers.cloudflare.com/pages/framework-guides/deploy-anything). | ||
|
||
Configure the "Build command" should be set to `npm run build`, and the "Build output directory" should be set to `public`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
import React from "react"; | ||
import { RemixBrowser } from "@remix-run/react"; | ||
import { hydrate } from "react-dom"; | ||
import { RemixBrowser } from "remix"; | ||
|
||
hydrate(<RemixBrowser />, document); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/build/* | ||
Cache-Control: public, max-age=31536000, s-maxage=31536000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"version": 1, | ||
"include": ["/*"], | ||
"exclude": ["/build/*"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,11 @@ | ||
/** | ||
* @type {import('@remix-run/dev/config').AppConfig} | ||
*/ | ||
/** @type {import('@remix-run/dev').AppConfig} */ | ||
module.exports = { | ||
appDirectory: "app", | ||
assetsBuildDirectory: "public/build", | ||
publicPath: "/build/", | ||
serverModuleFormat: "esm", | ||
serverPlatform: "neutral", | ||
serverBuildDirectory: "build", | ||
serverBuildTarget: "cloudflare-pages", | ||
server: "./server.js", | ||
devServerBroadcastDelay: 1000, | ||
ignoredRouteFiles: [".*"], | ||
ignoredRouteFiles: ["**/.*"], | ||
// appDirectory: "app", | ||
// assetsBuildDirectory: "public/build", | ||
// serverBuildPath: "functions/[[path]].js", | ||
// publicPath: "/build/", | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
/// <reference types="@remix-run/dev" /> | ||
/// <reference types="@remix-run/cloudflare-pages/globals" /> | ||
/// <reference types="@remix-run/cloudflare" /> | ||
/// <reference types="@cloudflare/workers-types" /> |
6 changes: 3 additions & 3 deletions
6
...res/remix-pages-app/functions/[[path]].js → fixtures/remix-pages-app/server.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.