Trying to add CF Pages
This commit is contained in:
parent
adf0d2766d
commit
eb2e41be03
3 changed files with 13 additions and 1 deletions
|
@ -1,7 +1,11 @@
|
||||||
import type { NextConfig } from "next";
|
import type { NextConfig } from "next";
|
||||||
|
import { setupDevPlatform } from '@cloudflare/next-on-pages/next-dev';
|
||||||
|
|
||||||
const nextConfig: NextConfig = {
|
const nextConfig: NextConfig = {
|
||||||
/* config options here */
|
/* config options here */
|
||||||
};
|
};
|
||||||
|
if (process.env.NODE_ENV === 'development') {
|
||||||
|
await setupDevPlatform();
|
||||||
|
}
|
||||||
|
|
||||||
export default nextConfig;
|
export default nextConfig;
|
||||||
|
|
|
@ -6,7 +6,10 @@
|
||||||
"dev": "next dev",
|
"dev": "next dev",
|
||||||
"build": "next build",
|
"build": "next build",
|
||||||
"start": "next start",
|
"start": "next start",
|
||||||
"lint": "next lint"
|
"lint": "next lint",
|
||||||
|
"pages:build": "npx @cloudflare/next-on-pages",
|
||||||
|
"preview": "npm run pages:build && wrangler pages dev",
|
||||||
|
"deploy": "npm run pages:build && wrangler pages deploy"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"next": "15.0.3",
|
"next": "15.0.3",
|
||||||
|
@ -15,6 +18,7 @@
|
||||||
"react-icons": "^5.3.0"
|
"react-icons": "^5.3.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@cloudflare/next-on-pages": "^1.13.5",
|
||||||
"@types/node": "^20",
|
"@types/node": "^20",
|
||||||
"@types/react": "^18",
|
"@types/react": "^18",
|
||||||
"@types/react-dom": "^18",
|
"@types/react-dom": "^18",
|
||||||
|
|
4
wrangler.toml
Normal file
4
wrangler.toml
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
name = "ronniie.dev"
|
||||||
|
compatibility_date = "2024-07-29"
|
||||||
|
compatibility_flags = ["nodejs_compat"]
|
||||||
|
pages_build_output_dir = ".vercel/output/static"
|
Loading…
Add table
Add a link
Reference in a new issue