-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Open
Labels
- P2: has workaroundBug, but has workaround (priority)Bug, but has workaround (priority)ecosystem: upstreamUpstream package has issueUpstream package has issuefeat: assetsRelated to the Assets feature (scope)Related to the Assets feature (scope)pkg: db
Description
Astro Info
Astro v5.16.2
Node v22.x
Adapter: @astrojs/[email protected] (output: "server")
Integration: @astrojs/[email protected] (mode: web)
Package manager: pnpm
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
Enabling experimental.fonts while using @astrojs/db with the Cloudflare adapter causes the build to fail during the astro:build:setup hook because source-map-js is required in a worker-like SSR context (require is not defined). Disabling fonts or removing @astrojs/db makes the build succeed.
Steps to reproduce
pnpm create astro@latest fonts-db-cloudflare-repro --template basics && cd fonts-db-cloudflare-repropnpm add [email protected] @astrojs/[email protected] @astrojs/[email protected]- Update
astro.config.mjsto:
import cloudflare from '@astrojs/cloudflare';
import db from '@astrojs/db';
import { defineConfig, fontProviders } from 'astro/config';
const fonts = [
{
provider: fontProviders.google(),
name: 'Doto',
cssVariable: '--font-title',
subsets: ['latin'],
},
];
export default defineConfig({
output: 'server',
adapter: cloudflare({ imageService: 'compile' }),
integrations: [db({ mode: 'web' })],
experimental: { fonts },
});What's the expected result?
Build should succeed.
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-bswzo7fm
Participation
- I am willing to submit a pull request for this issue.
Metadata
Metadata
Assignees
Labels
- P2: has workaroundBug, but has workaround (priority)Bug, but has workaround (priority)ecosystem: upstreamUpstream package has issueUpstream package has issuefeat: assetsRelated to the Assets feature (scope)Related to the Assets feature (scope)pkg: db