Removed vite-plugin-css-injected-by-js from portal#28975
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
💤 Files with no reviewable changes (1)
WalkthroughThe Possibly related PRs
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
|
| Command | Status | Duration | Result |
|---|---|---|---|
nx run @tryghost/admin-x-settings:test:acceptance |
✅ Succeeded | 10m 5s | View ↗ |
nx run ghost:test:integration |
✅ Succeeded | 2m 40s | View ↗ |
nx run ghost:test:ci:integration |
✅ Succeeded | 3s | View ↗ |
nx run ghost:test:legacy |
✅ Succeeded | 2m 48s | View ↗ |
nx run-many --target=build --projects=tag:publi... |
✅ Succeeded | 3s | View ↗ |
nx run ghost:test:e2e |
✅ Succeeded | 2m 23s | View ↗ |
nx run-many -t test:unit -p @tryghost/portal,@t... |
✅ Succeeded | 1m 25s | View ↗ |
nx run @tryghost/comments-ui:test:acceptance |
✅ Succeeded | 46s | View ↗ |
Additional runs (7) |
✅ Succeeded | ... | View ↗ |
💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗
☁️ Nx Cloud last updated this comment at 2026-06-29 22:11:21 UTC
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #28975 +/- ##
=======================================
Coverage 74.31% 74.31%
=======================================
Files 1562 1562
Lines 135348 135348
Branches 16448 16450 +2
=======================================
+ Hits 100588 100589 +1
+ Misses 33732 33731 -1
Partials 1028 1028
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
no ref Portal's two top-level CSS imports (`src/app.css`, `src/index.css`) are empty stubs. All real styles flow through `?inline` imports in `src/components/frame.styles.js`, which inject `<style>` tags into the `<head>` of each Portal iframe at runtime — independent of Vite's CSS pipeline. With nothing in the CSS graph to extract, the plugin was guarding against a problem that no longer exists. Vite's library mode already honours `build.cssCodeSplit: false` (kept in this config), so no separate `.css` asset is emitted alongside `portal.min.js`. Verified locally: pre/post `pnpm build` produces a single `umd/portal.min.js` (no `.css` sibling), byte sizes within 21 bytes of each other, iframe style-injection markers unchanged.
1c1a634 to
045cee6
Compare

Portal's two top-level CSS imports (
src/app.css,src/index.css) are empty stubs. All real styles flow through?inlineimports insrc/components/frame.styles.js, which inject<style>tags into the<head>of each Portal iframe at runtime — independent of Vite's CSS pipeline.With nothing in the CSS graph to extract, the plugin was guarding against a problem that no longer exists. Vite's library mode already honours
build.cssCodeSplit: false(kept in this config), so no separate.cssasset is emitted alongsideportal.min.js.Verification
pnpm buildbefore/after: singleumd/portal.min.jsin both cases, no.csssibling, sizes within 21 bytes (2,461,273 → 2,461,294).<style>injection markers (createElement('style'),appendChild) unchanged at 15 occurrences in the bundle — those come from theFramecomponent, not the removed plugin.pnpm test:unitinapps/portal: 582 passed / 1 skipped (these tests render the full React tree including iframe frames with?inlineCSS).componentDidMountruns — only console error is the expectedECONNREFUSEDto the fake API.@tryghost/portalto 2.69.14;check-app-version-bumppasses (defaults.json pins2.69major.minor).