Skip to content

fix: build error due to exports in propel package#7715

Merged
sriramveeraghanta merged 3 commits intopreviewfrom
chore-propel-export-dist
Sep 3, 2025
Merged

fix: build error due to exports in propel package#7715
sriramveeraghanta merged 3 commits intopreviewfrom
chore-propel-export-dist

Conversation

@sriramveeraghanta
Copy link
Member

@sriramveeraghanta sriramveeraghanta commented Sep 3, 2025

Description

  • build error due to exports in propel package

Type of Change

  • Bug fix (non-breaking change which fixes an issue)

Summary by CodeRabbit

  • Chores
    • Package exports updated to point to compiled JavaScript outputs for many UI components (fonts export unchanged).
    • Build config enhanced to generate type declarations, clean outputs, emit sourcemaps, and copy styles for more reliable builds.
  • New Features
    • Added a public styles export for the editor package so CSS assets are directly consumable.
  • Chores
    • Editor styles consolidated into a single CSS entry and global imports added to app stylesheets.

Copilot AI review requested due to automatic review settings September 3, 2025 12:04
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 3, 2025

Walkthrough

Updated package export maps to point to built JavaScript outputs; added editor styles export and moved editor style imports into a single CSS entry; extended editor build config to emit types, clean, sourcemaps, and copy styles; apps import the new editor styles.

Changes

Cohort / File(s) Summary
Propel exports update
packages/propel/package.json
Changed multiple subpath exports from ./dist/.../index.ts to ./dist/.../index.js for accordion, avatar, card, charts/*, combobox, command, dialog, emoji-icon-picker, menu, popover, switch, table, tabs, tooltip, utils. fonts remains index.css.
Editor public export
packages/editor/package.json
Added top-level export ./styles./dist/styles/index.css and adjusted trailing comma in the exports map.
Editor build config
packages/editor/tsdown.config.ts
Added build options: dts: true, clean: true, sourcemap: true, copy: ["src/styles"].
Editor style entrypoint
packages/editor/src/index.ts, packages/editor/src/styles/index.css
Removed direct JS imports of individual CSS files from src/index.ts; created src/styles/index.css that @imports variables.css, editor.css, table.css, github-dark.css, and drag-drop.css.
Apps global styles
apps/space/styles/globals.css, apps/web/styles/globals.css
Added @import "@plane/editor/styles"; after @plane/propel/styles/fonts and before Tailwind layers in both global stylesheets.

Sequence Diagram(s)

sequenceDiagram
  participant Dev as Developer
  participant TSDown as tsdown build
  participant Dist as /dist
  participant PackageJSON as package.json exports
  participant App as App (web/space)

  Dev->>TSDown: run build (dts, clean, sourcemap, copy styles)
  TSDown->>Dist: emit .js, .d.ts, sourcemaps, copy styles to dist/styles
  TSDown-->>PackageJSON: no change at runtime
  Note right of PackageJSON: package exports updated to point to ./dist/.../index.js
  App->>PackageJSON: import "@plane/editor/styles" / "@plane/propel/styles/fonts"
  PackageJSON->>Dist: resolve to `./dist/styles/index.css` and `./dist/.../index.js`
  App->>Dist: load CSS from dist/styles and component JS from dist
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

🌐web, :card_file_box: packaging

Suggested reviewers

  • sriramveeraghanta
  • anmolsinghbhatia
  • prateekshourya29

Poem

I nibble through builds, a hop and spin,
From .ts to .js the pathways begin.
Styles bundled neat in one little file,
Copied, mapped, and ready to compile.
A rabbit hums—exports ship with a smile. 🐇✨

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore-propel-export-dist

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore or @coderabbit ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a build error in the propel package by correcting the file extensions in the exports field from .ts to .js. The issue was that the exports were pointing to TypeScript source files instead of the compiled JavaScript output files.

  • Updated all export paths to use .js extensions instead of .ts

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
packages/editor/package.json (1)

1-103: Optional: mark CSS as side effects to prevent tree-shaking from dropping it.

Some bundlers respect the sideEffects field. Safeguard CSS imports from accidental elimination.

   "private": true,
   "files": [
     "dist"
   ],
+  "sideEffects": [
+    "./dist/styles/*.css"
+  ],
packages/editor/tsdown.config.ts (1)

7-10: Make the copy destination explicit to match the ./styles export.

Ensure the copier writes to dist/styles/**. If tsdown supports it, prefer an explicit mapping; otherwise keep your current config and adjust if the output nests under src/.

-  copy: ["src/styles"],
+  // Ensure output is dist/styles/**
+  copy: [{ from: "src/styles", to: "styles" }],

If this shape isn’t supported, consider a postbuild step (e.g., using cpy) or update the export to whatever path tsdown actually emits.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 648cfbe and 02d15f4.

📒 Files selected for processing (2)
  • packages/editor/package.json (1 hunks)
  • packages/editor/tsdown.config.ts (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Analyze (javascript)
  • GitHub Check: Build and lint web apps
🔇 Additional comments (3)
packages/editor/package.json (2)

22-23: CSS subpath export looks right; confirm the copied output matches the path.

With copy: ["src/styles"], verify that the build produces dist/styles/index.css (not dist/src/styles/index.css). If the tool nests under src/, either adjust the export path or make the copy destination explicit.


14-17: Add a CJS require export for the root entry
Under exports["."], include

"require": "./dist/index.js"

to ensure require("@plane/editor") resolves correctly—verify that dist/index.js is produced by your build.

packages/editor/tsdown.config.ts (1)

7-10: Nice: dts, clean, and sourcemaps enabled.

Improves DX and release hygiene.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
apps/web/styles/globals.css (1)

429-429: Fix CSS variable declaration syntax (parsing error).

Two variables are merged into one line, breaking CSS parsing.

-    --color-text-350: 190, 190, 190 --color-text-400: 115, 115, 115; /* placeholder text */
+    --color-text-350: 190, 190, 190;
+    --color-text-400: 115, 115, 115; /* placeholder text */
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 02d15f4 and 15522e7.

📒 Files selected for processing (4)
  • apps/space/styles/globals.css (1 hunks)
  • apps/web/styles/globals.css (1 hunks)
  • packages/editor/src/index.ts (0 hunks)
  • packages/editor/src/styles/index.css (1 hunks)
💤 Files with no reviewable changes (1)
  • packages/editor/src/index.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Build and lint web apps
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (5)
apps/space/styles/globals.css (2)

2-2: Add editor styles import — LGTM.

Centralizing editor styles via the new package export is clean and consistent with apps/web.


2-2: Confirm CSS ordering vs Tailwind layers.

Importing editor styles before @tailwind base; means Tailwind’s base/components may override some editor rules. If the intent is for editor styles to win, consider moving this import after Tailwind layers or ensuring the editor CSS uses higher specificity.

packages/editor/src/styles/index.css (1)

1-5: Aggregator order looks good.

Loading variables first, then core/editor/table/theme/drag-drop is sensible.

apps/web/styles/globals.css (2)

2-2: Add editor styles import — LGTM.

Matches apps/space and aligns with the new editor styles export.


2-2: Confirm CSS ordering vs Tailwind layers.

Same note as in apps/space: if editor styles should override Tailwind, import them after Tailwind layers or increase specificity.

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.

5 participants