feat: inject minified css in bundle#560
Merged
Merged
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
mme
reviewed
Sep 6, 2024
mme
left a comment
Contributor
There was a problem hiding this comment.
As far as I can tell, this looks good.
Just some pointers:
- search the code for "@copilotkit/react-ui/styles.css" and the other css files, I'm pretty sure there are more occurences
- We should QA usage in different frameworks e.g. remix
Contributor
Author
I don't think there's anything that could be affected by frameworks: if (globalThis.hasOwnProperty("document")) {
const style = document?.createElement("style");
style.innerHTML = '${resultCSS}';
document?.head.appendChild(style);
} |
arielweinberger
added a commit
that referenced
this pull request
Sep 23, 2024
This reverts commit c2963a0.
arielweinberger
added a commit
that referenced
this pull request
Sep 24, 2024
johannhartmann
pushed a commit
to johannhartmann/CopilotKit
that referenced
this pull request
Oct 31, 2025
* feat: add css injection at build time * feat(react-textarea): remove unused IncludedFilesPreview component * fix formatting * update dependencies * fix build issues * feat(docs): remove styles.css import from inline docs * fix(docs): remove mentioning of importing styles.css * fix(docs): remove unnecessary line highlighting * fix line highlighting
johannhartmann
pushed a commit
to johannhartmann/CopilotKit
that referenced
this pull request
Oct 31, 2025
* Revert "feat: inject minified css in bundle (CopilotKit#560)" This reverts commit c2963a0. * fix import * regenerate package lock
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
styles.cssmanuallystyles.cssincluded in the build for backwards compatibilityinjectStyleswithpostcssto bundle and minify the CSS, then inject it as a style tagtsupwhere I added support for async function ininjectStyles(must-have for postcss), a PR from my fork to the main library will follow shortlyreact-iconsfor icons (same icons as before)IncludedFilesPreviewcomponentHow to test this
Check out the preview deployment below.
react-ui, head over to/presentationreact-textarea, head over to/textarea