Skip to content

Create a standalone bundle for non-React apps - #922

Merged
Dananji merged 1 commit into
mainfrom
preact-build
Apr 15, 2026
Merged

Create a standalone bundle for non-React apps#922
Dananji merged 1 commit into
mainfrom
preact-build

Conversation

@Dananji

@Dananji Dananji commented Mar 26, 2026

Copy link
Copy Markdown
Collaborator

Related issue: #920

Changes in this PR:

  • adds preact as a devDependency
  • adds additional config to the vite.config.js to create the standalone bundle with preact/comact
  • document the usage of the standalone bundle in README.md (the unpkg URLs are the expected values for when/if this is published to NPM)

@cjcolvar

Copy link
Copy Markdown
Member

This looks great!

If we want to keep the build small then maybe the standalone could be offered as a release asset instead of including it in the npm bundle? But upgrading would be manual for implementers and we'd lose the automatic unpkg CDN. So I think I'm in favor of including the standalone build in the npm bundle. I don't think it bumps up the npm bundle too much and even with the standalone build ramp (~7.6MB) will still be smaller than Clover (10.4MB) or UV (29.5MB).

@Dananji
Dananji marked this pull request as ready for review April 15, 2026 18:41

@cjcolvar cjcolvar left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks great!

@Dananji
Dananji merged commit f61ce87 into main Apr 15, 2026
3 checks passed
@Dananji
Dananji deleted the preact-build branch April 15, 2026 19:58
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