fix: build error due to exports in propel package#7715
fix: build error due to exports in propel package#7715sriramveeraghanta merged 3 commits intopreviewfrom
Conversation
WalkthroughUpdated 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
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
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
✨ Finishing Touches
🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
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
.jsextensions instead of.ts
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
02d15f4
There was a problem hiding this comment.
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
sideEffectsfield. 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./stylesexport.Ensure the copier writes to
dist/styles/**. Iftsdownsupports it, prefer an explicit mapping; otherwise keep your current config and adjust if the output nests undersrc/.- 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 pathtsdownactually 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.
📒 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 producesdist/styles/index.css(notdist/src/styles/index.css). If the tool nests undersrc/, either adjust the export path or make the copy destination explicit.
14-17: Add a CJSrequireexport for the root entry
Underexports["."], include"require": "./dist/index.js"to ensure
require("@plane/editor")resolves correctly—verify thatdist/index.jsis produced by your build.packages/editor/tsdown.config.ts (1)
7-10: Nice: dts, clean, and sourcemaps enabled.Improves DX and release hygiene.
There was a problem hiding this comment.
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.
📒 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.
Description
Type of Change
Summary by CodeRabbit