Skip to content

Commit 216a710

Browse files
fix cloudflare excluding api routes from worker bundle
1 parent 7e44be4 commit 216a710

File tree

4 files changed

+27
-10
lines changed

4 files changed

+27
-10
lines changed

astro.config.mjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,5 @@ export default defineConfig({
1919
}
2020
}
2121
},
22-
2322
adapter: cloudflare()
2423
});

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
"build:cli": "tsc --build ./cli/tsconfig.json",
1717
"build:cli:watch": "tsc --build --watch ./cli/tsconfig.json",
1818
"build:props": "npm run build:cli && node ./dist/cli/cli.js generate-props",
19-
"preview": "astro build && wrangler pages dev",
19+
"preview": "wrangler pages dev",
2020
"astro": "astro",
21-
"deploy": "npm run build && wrangler pages deploy",
21+
"deploy": "wrangler pages deploy",
2222
"prettier": "prettier --write ./src",
2323
"lint": "eslint . --cache --cache-strategy content",
2424
"test": "jest",

public/_routes.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"version": 1,
3+
"include": [
4+
"/*"
5+
],
6+
"exclude": [
7+
"/",
8+
"/_astro/*",
9+
"/.assetsignore",
10+
"/PF-HorizontalLogo-Color.svg",
11+
"/PF-HorizontalLogo-Reverse.svg",
12+
"/avatarImg.svg",
13+
"/avatarImgDark.svg",
14+
"/favicon.svg",
15+
"/content/*",
16+
"/components/*",
17+
"/layouts/*",
18+
"/patterns/*",
19+
"/utility-classes/*",
20+
"/extensions/*"
21+
]
22+
}

wrangler.jsonc

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
11
{
22
"$schema": "node_modules/wrangler/config-schema.json",
3-
"name": "patternfly-org",
4-
"main": "./dist/_worker.js/index.js",
3+
"name": "patternfly-docs-core",
54
"compatibility_date": "2025-06-17",
65
"compatibility_flags": ["nodejs_compat"],
7-
"assets": {
8-
"binding": "ASSETS",
9-
"directory": "./dist"
10-
},
116
"observability": {
127
"enabled": true
13-
}
8+
},
9+
"pages_build_output_dir": "dist/docs"
1410
}

0 commit comments

Comments
 (0)