Open petethered opened 1 month ago
Nothing immediately jumps to me as missing or wrong; that should be working.
I'll try to reproduce it locally and fix it. Thanks for reporting 😄
Thanks!
I can throw together a small project to be a full replication if you'd like. It's really just the one line
const response = await fetch(`http://server/staticGenerator/items?allId=1`);
That's the issue and not running during the build.
I BELIEVE i tried copying the fetch call directly into the sitemap(async instead of using external, but the external is getting invoked just there's no wait for the promise... it just bails out silently.
Is the server
the project being built or something external?
It's an external URL (ie http://example.com/staticGenerator/items?allId=1)
I've tried building on both local and having cloudflare build it.
I've made sure no experimental flags are enabled.
I upgraded to the latest astro.
"@astrojs/tailwind": "^5.1.0",
"@faker-js/faker": "^7.3.0",
"astro": "^4.14.2",
"daisyui": "^4.4.23",
"globby": "^11.0.4",
"prettier": "^2.8.8",
"prettier-plugin-astro": "^0.0.12"
},
"dependencies": {
"@astrojs/cloudflare": "^11.0.4",
"@astrojs/preact": "^3.5.1",
"@astrojs/react": "^3.6.2",
"@astrojs/sitemap": "^3.1.6",
"@inox-tools/sitemap-ext": "^0.3.2",
"@preact/signals": "^1.3.0",
"@types/react": "^18.0.10",
"@types/react-dom": "^18.0.5",
"astro-tabs": "^0.1.8",
"astro-vtbot": "^1.8.4",
"preact": "^10.23.1",
"sass": "^1.69.5"
}
import preact from "@astrojs/preact";
import tailwind from "@astrojs/tailwind";
//import sitemap from "@astrojs/sitemap";
import sitemap from '@inox-tools/sitemap-ext';
// https://astro.build/config
import cloudflare from "@astrojs/cloudflare";
// https://astro.build/config
export default defineConfig({
// Enable React to support React JSX components.
experimental: {
// contentCollectionCache: true
},
site: 'https://recentmusic.com',
integrations: [preact(), tailwind({
config: {
path: "./tailwind.config.js"
}
}), sitemap({
includeByDefault: true,
})],
output: "server",
adapter: cloudflare()
});
https://github.com/petethered/sitemap-ext-test-case
Here you go, full replication case.
https://github.com/petethered/sitemap-ext-test-case/blob/main/src/pages/divisions/%5Bid%5D.astro
I'm trying to convert a SSG to SSR and found your extension which has been solving some of my sitemap issues. Thanks!
That being said, I'm running into issues trying to pull a list of ids to include in the sitemap for
During build, the await for fetch doesn't seem to be waiting.
[id].astro
items.ts
Running build shows the "PreFetch", and the url in the console log, but nothing happens... the request isn't made.
Mind telling me what I'm missing?