Skip to content

Emit separate editor and content stylesheets from the build tools#1438

Merged
filipsobol merged 7 commits into
masterfrom
ci/4268-separate-editor-and-content-styles
Jul 22, 2026
Merged

Emit separate editor and content stylesheets from the build tools#1438
filipsobol merged 7 commits into
masterfrom
ci/4268-separate-editor-and-content-styles

Conversation

@filipsobol

Copy link
Copy Markdown
Member

🚀 Summary

Replaces the splitCss plugin with a reworked bundleCss plugin in ckeditor5-dev-build-tools. CSS must now be imported through explicit index-editor.css and index-content.css entry points, and the build emits three stylesheets: the combined bundle (preserving the JavaScript import order, where the editor and content styles of each feature sit next to each other), plus separate -editor and -content bundles.

The CSS ordering traversal now starts from the chunk facade module instead of every chunk module, which reduces the plugin's generateBundle() time on the full ckeditor5 bundle from ~1.2 s to ~30 ms with byte-identical output.


📌 Related issues


💡 Additional information

The three stylesheets are bundled by Lightning CSS from virtual entry points, so @imports are flattened and warnings are forwarded to Rolldown with correct source locations.

Comment thread packages/ckeditor5-dev-build-tools/src/plugins/bundleCss.ts
Comment thread packages/ckeditor5-dev-build-tools/tests/build/build.test.ts
Comment thread packages/ckeditor5-dev-build-tools/tests/plugins/bundleCss/bundleCss.test.ts Outdated
Comment thread packages/ckeditor5-dev-build-tools/src/plugins/bundleCss.ts
Comment thread packages/ckeditor5-dev-build-tools/tests/build/build.test.ts
Comment thread packages/ckeditor5-dev-build-tools/src/plugins/bundleCss.ts

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 3399eeb. Configure here.

Comment thread packages/ckeditor5-dev-build-tools/src/plugins/bundleCss.ts Outdated
@filipsobol
filipsobol merged commit 345faea into master Jul 22, 2026
6 checks passed
@filipsobol
filipsobol deleted the ci/4268-separate-editor-and-content-styles branch July 22, 2026 12:14
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.

2 participants