Skip to content

feat: knighted css imports.#139

Merged
knightedcodemonkey merged 3 commits intomainfrom
bananas
May 7, 2026
Merged

feat: knighted css imports.#139
knightedcodemonkey merged 3 commits intomainfrom
bananas

Conversation

@knightedcodemonkey
Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings May 7, 2026 20:32
Copy link
Copy Markdown
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

Adds support for ?knighted-css (and &combined) query imports in workspace tabs so modules (or style tabs) can be imported with additional exports containing compiled CSS text (and optionally re-exporting the target module).

Changes:

  • Extend style compilation output to include a per-style-tab compiled CSS map (styleCssByTabId) and pass it into virtual module planning.
  • Add virtual module rewriting for ?knighted-css query imports, producing data-URL modules that export knightedCss / knightedCssModules (and optionally the target module exports via combined).
  • Document the query import feature in the README and add Playwright coverage for query imports.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
src/modules/preview/render-runtime.js Tracks compiled CSS per style tab and forwards it to the virtual module planner.
src/modules/preview-runtime/virtual-workspace-modules.js Parses query flags and rewrites imports to generate ?knighted-css query modules (including combined).
README.md Documents ?knighted-css and &combined workspace import patterns and expected exports.
playwright/rendering-modes/core.spec.ts Adds E2E tests validating ?knighted-css behavior for module and style tab imports.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/modules/preview/render-runtime.js Outdated
Comment thread src/modules/preview-runtime/virtual-workspace-modules.js Outdated
@knightedcodemonkey knightedcodemonkey merged commit 6f83b8d into main May 7, 2026
6 checks passed
@knightedcodemonkey knightedcodemonkey deleted the bananas branch May 7, 2026 20:56
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