Skip to content

Commit d75e164

Browse files
Prevent the api index from being bundled, which can cause it to be outdated
1 parent 9fd87fb commit d75e164

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

README.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Any static assets, like images, can be placed in the `public/` directory.
3333

3434
To define the markdown schema this project uses a typescript based schema known as [Zod](https://zod.dev). Details of how this is integratred into Astro can be found in Astros documentation on [content creation using Zod](https://docs.astro.build/en/guides/content-collections/#defining-datatypes-with-zod).
3535

36-
Note: When running in dev mode locally, API endpoints are not available on a clean repo until either a build has been done or a tab route has been hit.
36+
Note: When running in dev mode locally, API endpoints are not available on a clean repo until a build has been done
3737
### 🧞 Commands
3838

3939
All commands are run from the root of the project, from a terminal:

astro.config.mjs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ export default defineConfig({
1313
noExternal: ["@patternfly/*", "react-dropzone"],
1414
external: ["node:fs", "node:path"]
1515
},
16+
build: {
17+
rollupOptions: {
18+
external: [/apiIndex\.json$/]
19+
}
20+
},
1621
server: {
1722
fs: {
1823
allow: ['./']

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525
"test": "jest",
2626
"test:watch": "jest --watch",
2727
"semantic-release": "semantic-release",
28-
"cf-typegen": "wrangler types"
28+
"cf-typegen": "wrangler types",
29+
"clean": "rm -rf dist .astro .wrangler"
2930
},
3031
"main": "dist/cli/cli.js",
3132
"bin": "./dist/cli/cli.js",

0 commit comments

Comments
 (0)