-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: upgrade to remix v2 with vite setup
- Loading branch information
1 parent
4ec7464
commit 8d9881c
Showing
18 changed files
with
186 additions
and
345 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,23 +1,12 @@ | ||
node_modules | ||
.env | ||
|
||
# Remix | ||
/.cache | ||
/build | ||
/public/build | ||
|
||
# Remix stacks | ||
/package-lock.json | ||
|
||
# Custom Build | ||
/dist | ||
|
||
# Tailwind | ||
/app/styles/tailwind.css | ||
# Cloudflare | ||
.wrangler | ||
|
||
# Cypress | ||
/cypress/videos | ||
/cypress/screenshots | ||
|
||
# Miniflare | ||
/.mf | ||
/.env | ||
# Remix stacks | ||
/package-lock.json |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,3 @@ | ||
@tailwind base; | ||
@tailwind components; | ||
@tailwind utilities; |
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,14 @@ | ||
import 'vite/client'; | ||
import '@remix-run/cloudflare'; | ||
import '@cloudflare/workers-types'; | ||
|
||
interface Env { | ||
ENVIRONMENT?: 'development'; | ||
} | ||
|
||
declare module '@remix-run/cloudflare' { | ||
export interface AppLoadContext { | ||
env: Env; | ||
waitUntil(promise: Promise<void>): void; | ||
} | ||
} |
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,16 @@ | ||
import { createPagesFunctionHandler } from '@remix-run/cloudflare-pages'; | ||
|
||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment | ||
// @ts-ignore - the server build file is generated by `remix vite:build` | ||
// eslint-disable-next-line import/no-unresolved | ||
import * as build from '../build/server'; | ||
|
||
export const onRequest = createPagesFunctionHandler({ | ||
build, | ||
getLoadContext: (context) => ({ | ||
env: context.env, | ||
waitUntil(promise: Promise<unknown>) { | ||
context.waitUntil(promise); | ||
}, | ||
}), | ||
}); |
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,6 @@ | ||
module.exports = { | ||
plugins: { | ||
tailwindcss: {}, | ||
autoprefixer: {}, | ||
}, | ||
}; |
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 @@ | ||
/assets/* | ||
Cache-Control: public, max-age=31536000, immutable |
Oops, something went wrong.