Commit Graph
7 Commits
Author SHA1 Message Date
Kamran Ahmed 630adda553 Ship hints as the driver.js/hints entry
Two separate vite runs rather than one multi-entry build. Multi-entry
splits the shared popover primitive into a chunk, which would make the
tour bundle depend on a second file and cost every existing user bytes
for a feature they may never use; it also merged both stylesheets into
driver.css. Standing the entries alone keeps driver.css byte-identical
to master and the tour bundle within ~120 bytes of it, and lets hints be
used without the tour. Importing both duplicates the primitive (~2KB
gzip), which is safe because the copies only handle their own popovers.

The hints run writes to dist-hints/ and the postbuild folds it into
dist/. That indirection is not incidental: vite-plugin-dts takes its
entry from package.json's `types` field when bundling, not from the lib
entry, so pointing it at hints emits the tour's API under the hints name
and overwrites dist/driver.js.d.ts. api-extractor rolls up the hints
declarations from an explicit entry instead.

hints/package.json is a resolution shim for legacy node10, which predates
`exports`; attw is green across node10, node16 ESM/CJS and bundler for
both entries. sideEffects marks only CSS, so bundlers can drop unused
code from either entry.

Sizes (gzip): tour 6.7KB unchanged in CSS and ~6.8KB in JS, hints 4.2KB
JS + 0.4KB CSS standalone.
2026-07-15 04:27:53 +01:00
Kamran Ahmed 1910fb2c30 Minify the ESM bundle with Terser in postbuild 2026-07-08 03:38:26 +01:00
Kamran Ahmed cbf719f87e Fix postbuild esbuild resolution by using Vite 2026-07-08 03:33:40 +01:00
Kamran Ahmed bf4ae7e492 Tighten comments across the per-instance changes 2026-07-08 02:04:39 +01:00
Kamran Ahmed 8ccf77faa6 Minify the ESM bundle whitespace in postbuild 2026-07-06 21:03:11 +01:00
Kamran Ahmed 2088df4a90 Switch release tooling from np to release-it
- Tag and commit use the unreleased version with no v prefix
- Move changelog Unreleased entries under the version on bump
- GitHub release notes are pulled from the changelog section
2026-06-25 18:07:16 +01:00
Kamran Ahmed bf461234b8 Validate the package on publish/CI; fix dual-format types 2026-06-23 13:48:29 +01:00