Skip to content

fix exports of stack-shared#667

Closed
similiarity wants to merge 8 commits into
devfrom
improve-build-config
Closed

fix exports of stack-shared#667
similiarity wants to merge 8 commits into
devfrom
improve-build-config

Conversation

@similiarity
Copy link
Copy Markdown
Contributor

@similiarity similiarity commented May 10, 2025


Important

Fix exports in package.json for ESM and CommonJS compatibility and update turbo.json build inputs.

  • Exports:
    • Change main in package.json to ./dist/esm/index.js.
    • Add require field in exports for CommonJS compatibility in package.json.
  • Build Configuration:
    • Add tsup.config.ts and config/js-library.ts to build inputs in turbo.json.

This description was created by Ellipsis for 0bff55e. You can customize this summary. It will automatically update as commits are pushed.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 10, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
stack-backend ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 13, 2025 9:46pm
stack-dashboard ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 13, 2025 9:46pm
stack-demo ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 13, 2025 9:46pm

Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

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

PR Summary

Updated the exports configuration in stack-shared's package.json to improve module system compatibility and build configuration.

  • Removed legacy 'main' and 'types' fields in favor of modern 'exports' field configuration
  • Added explicit import/require conditions in exports field for dual ESM/CommonJS support
  • Set package type to 'module' to enable ESM by default
  • Configured separate paths for ESM and CommonJS builds in exports field

💡 (3/5) Reply to the bot's comments like "Can you suggest a fix for this @greptileai?" or ask follow-up questions!

1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants