Description
When starlight-codeblock-fullscreen (v0.1.4) is used alongside starlight-scroll-to-top (v0.4.0), the build fails with a Duplicate export "default" error in the bundled page script.
Reproduction
astro.config.mjs:
import starlight from '@astrojs/starlight';
import starlightScrollToTop from 'starlight-scroll-to-top';
import starlightCodeblockFullscreen from 'starlight-codeblock-fullscreen';
export default defineConfig({
integrations: [
starlight({
plugins: [
starlightScrollToTop(),
starlightCodeblockFullscreen(),
],
// ...
}),
],
});
npm run build output:
[ERROR] [vite] ✗ Build failed in 13ms
astro:scripts/page.js (1624:0): Duplicate export "default"
file: astro:scripts/page.js:1624:0
1622: }
1623:
1624: export default initECFullscreen;
^
Environment
starlight-codeblock-fullscreen: 0.1.4
starlight-scroll-to-top: 0.4.0
@astrojs/starlight: 0.38.2
astro: 6.0.1
- Node: 24.14.0
Notes
- Removing either plugin resolves the issue — the conflict is specifically between these two.
- Both plugins appear to inject scripts into the page, and the bundler merges them into
astro:scripts/page.js with conflicting export default statements.
starlight-heading-badges (v0.7.0) works fine alongside both plugins individually.
Description
When
starlight-codeblock-fullscreen(v0.1.4) is used alongsidestarlight-scroll-to-top(v0.4.0), the build fails with aDuplicate export "default"error in the bundled page script.Reproduction
astro.config.mjs:npm run buildoutput:Environment
starlight-codeblock-fullscreen: 0.1.4starlight-scroll-to-top: 0.4.0@astrojs/starlight: 0.38.2astro: 6.0.1Notes
astro:scripts/page.jswith conflictingexport defaultstatements.starlight-heading-badges(v0.7.0) works fine alongside both plugins individually.