@coding-blocks/vmc-web-components 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -5,8 +5,17 @@ inside, plain custom elements on the outside — a host page only needs one
5
5
  `<script>` tag and the element.
6
6
 
7
7
  Every component in this repo ships in **one bundle**: `dist/vmc-web-components.js`
8
- (React and the CSS are inlined, so there are no peer dependencies and no extra
9
- network requests).
8
+ 37.8 kB, ~14 kB gzipped over the wire, with the runtime and the CSS inlined.
9
+ No peer dependencies, no extra network requests.
10
+
11
+ The source is written against React, but the build aliases `react`/`react-dom`
12
+ to `preact/compat`, which is what actually ships — same JSX and hooks, ~5x
13
+ smaller for a script that loads on other people's pages. Nothing in `src/`
14
+ imports Preact directly, so the alias in `vite.config.ts` is the only place that
15
+ knows. Two build notes worth keeping: the published bundle carries **no
16
+ sourcemap** (it was 4.5x the size of the code), and terser's `unsafe_*` /
17
+ `booleans_as_integers` options are deliberately off — they saved ~2 kB and broke
18
+ Preact's event proxy at runtime.
10
19
 
11
20
  ## Usage
12
21