Skip to content

Create a second bundled build file. Original build remains unchanged.#573

Merged
hoorayimhelping merged 1 commit intomainfrom
bucky-change-styledcomponents-for-docs
Apr 2, 2025
Merged

Create a second bundled build file. Original build remains unchanged.#573
hoorayimhelping merged 1 commit intomainfrom
bucky-change-styledcomponents-for-docs

Conversation

@hoorayimhelping
Copy link
Member

@hoorayimhelping hoorayimhelping commented Mar 28, 2025

This changes the vite build config to have two different dynamically configs. The default / original config remains unchanged, but the new one bundles styled-components as part of the build and creates a new new (click-ui.bundled.${format}.js, and export path ("./bundled"). The new bundled file can by accessed at @clickhouse/click-ui/bundled, like in the example below:

import { Button } from "@clickhouse/click-ui/bundled";

This is done because the docs repo uses docusaurus, which doesn't work with styled-components, and so needed it bundled as part of the exported library file.

@vercel
Copy link

vercel bot commented Mar 28, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
click-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 28, 2025 7:05pm

@serdec
Copy link
Member

serdec commented Mar 31, 2025

i'm ok with this change to test, in the long term i think we should go for one approach (either include or exclude style-components) and document it well

@hoorayimhelping
Copy link
Member Author

i'm ok with this change to test, in the long term i think we should go for one approach (either include or exclude style-components) and document it well

To be honest, I'm a little nervous with it myself. I did some testing locally which gives me some confidence, but you can never really know how things will go until you release the library.

I'm planning on doing what Vineeth suggested and having a kind of beta type release rather than a regular one, and then add it to all the libraries that use it to make sure it works properly. I think the long-term goal should be a single distributable, but I couldn't get one type working with all repos, so this is a reasonable band-aid solution.

@hoorayimhelping hoorayimhelping merged commit b8d663c into main Apr 2, 2025
6 checks passed
@hoorayimhelping hoorayimhelping deleted the bucky-change-styledcomponents-for-docs branch April 2, 2025 19:17
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