Skip to content

fix: add website/sections exports to package.json#19

Merged
JonasJesus42 merged 3 commits intomainfrom
fix/website-sections-export
Apr 13, 2026
Merged

fix: add website/sections exports to package.json#19
JonasJesus42 merged 3 commits intomainfrom
fix/website-sections-export

Conversation

@JonasJesus42
Copy link
Copy Markdown
Contributor

@JonasJesus42 JonasJesus42 commented Apr 13, 2026

Summary

  • Add ./website/sections/* and ./website/sections/Seo/* subpath exports to package.json
  • Without these, Vite fails with Missing "./website/sections/Seo/SeoV2" specifier in "@decocms/apps" package when sites import section loaders

Context

The website app was merged in #17 but sections subpath exports were missing. Sites that register the SeoV2 loader (for ?asJson SEO resolution) need to import("@decocms/apps/website/sections/Seo/SeoV2").

Test plan

  • Verify site can import("@decocms/apps/website/sections/Seo/SeoV2") without Vite errors
  • Verify npm run dev starts successfully

🤖 Generated with Claude Code


Summary by cubic

Added subpath exports for ./website/sections/* and ./website/sections/Seo/* in package.json to fix Vite “Missing specifier” errors when importing section loaders from @decocms/apps. Switched website config to a globalThis.__decoWebsiteConfig singleton and updated SeoV2 to fall back to it when seo isn’t provided, so standalone imports like @decocms/apps/website/sections/Seo/SeoV2 (e.g., ?asJson) work even with Vite module duplication; also applied Biome import-order/formatting fixes.

Written for commit 555da88. Summary will update on new commits.

Vite requires subpath exports to be declared explicitly.
Without these entries, `import("@decocms/apps/website/sections/Seo/SeoV2")`
fails with "Missing specifier" during dependency scanning.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

JonasJesus42 and others added 2 commits April 13, 2026 17:04
- website/client.ts: Use globalThis.__decoWebsiteConfig instead of
  module-level variable to survive Vite module duplication (optimized
  deps vs raw source imports create separate module instances).
- SeoV2.tsx: Fall back to getWebsiteConfig() singleton when the seo
  argument is not provided, enabling standalone use from the asJson
  handler without requiring the full app resolution pipeline.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@JonasJesus42 JonasJesus42 merged commit 66b09ee into main Apr 13, 2026
2 checks passed
@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 1.3.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant