@typestyles/webpack
packages/webpack/CHANGELOG.md
0.6.3
Patch Changes
- Updated dependencies [
01d04a4,3b624ad]:- @typestyles/build-runner@0.10.0
0.6.2
Patch Changes
- Updated dependencies [
54535af]:- @typestyles/build-runner@0.9.0
0.6.1
Patch Changes
- Updated dependencies [
e861e27,e861e27]:- @typestyles/build-runner@0.8.1
0.6.0
Minor Changes
#310
ad6fe59Thanks @dbanksdesign! - Add an experimental compile-time transform (compile: true) for zero-runtime client bundles.Extraction now records a small JSON plan per
recipe()— base classes, slots, dimensions and defaults, i.e. everything a call needs — in the same Node run that produces the CSS (runTypestylesExtractreturns{ css, plans };runTypestylesBuildis unchanged). Withcompile: true, the Vite, Rollup, esbuild (and Bun), and webpack (and Rspack) integrations replacerecipe({ name, ... })definitions in client bundles withcreateAttrsRecipeFromPlan(<plan>)from the newtypestyles/liteentry (under 1 KB gzipped), and mark calls of style factories imported fromtypestyles(createTypeStyles,createStyles,createTokens,createGlobal) as pure. The style configs, token tables and CSS machinery they referenced then tree-shake away. Class names,data-*attributes and the emitted CSS are unchanged.Plans cover attribute-mode dimensioned and slot recipes, flat and multi-slot recipes, and the class-name modes (
semantic,bem,template,hashed,compact,atomic) for dimensioned recipes (with compound variants) plus slot recipes insemantic/bem/template. Parity with the real runtime is tested across a grid of selections. Calls that can't be planned (non-literal names, spreads in the recipe config, a name used in more than one scope, themes/tokens whose results are read at runtime, recipes in unsupported shapes) keep the runtime, and the Vite and Rollup integrations warn when a substantial part of it remains.On var-ui's bundle fixtures this removes about 80–105 KB of minified JS (button-only 312.7 → 230.2 KB, form-kit 457.9 → 367.3 KB, date-kit 512.9 → 421.7 KB).
@typestyles/vitereturns two plugins whencompile: true(the transform must run after Vite's own TypeScript transform); otherwise it still returns a single plugin. Rewritten modules keep accurate source maps, still go through duplicate-namespace checks, and are re-transformed in watch mode and with webpack's cache so plans never go stale. Plans are only recorded while extraction runs (getClientPlans()is empty in normal runtime builds), and extraction now returns its result through a temp file, so style modules that log to stdout no longer affect it.@typestyles/build-runnergains the shared transform (transformRecipeCalls,indexPlans, …) andacorn,magic-stringand@jridgewell/remappingdependencies.#307
429d477Thanks @dbanksdesign! - Zero-runtime client builds now ship no CSS insertion runtime — for every typestyles entry point.typestylespublishes its stylesheet module (dist/sheet.js) next to a no-op sibling (dist/sheet-noop.js) that exports the same API but does nothing. Every other module reaches the sheet through that one file, so inmode: 'build'the bundler integrations just redirect it in client bundles. The stylesheet state, CSSOM/DOM plumbing, insertion registry and dev-time collision bookkeeping never enter the module graph, while class names and data attributes are computed identically.- One module graph, one registry:
typestyles,typestyles/css,typestyles/color, … are all covered, with nothing to import differently and no specifier rewriting. @typestyles/vite(and@typestyles/astro) and@typestyles/rollup:resolveIdhook (client builds only for Vite).@typestyles/esbuild:onResolvehook (skipped forplatform: 'node').@typestyles/webpackand@typestyles/next/build: module-factory hook (non-node targets / client bundles only; server bundles keep the real runtime for SSR collection).mode: 'runtime'/'hybrid', development builds, and server/SSR/node builds keep the full runtime.- Vite, Rollup and webpack warn at build time if the real sheet still ends up in a zero-runtime client bundle.
- Development diagnostics (namespace/class-name collision tracking) are gated behind the sheet, so they are absent from zero-runtime bundles.
@typestyles/build-runnerexportstoZeroRuntimeSheetId,isSheetRequest,findRealSheetModules,zeroRuntimeLeakMessageandZeroRuntimeSheetWebpackPluginfor custom integrations.- The package also declares a conservative
sideEffectsallowlist (hmr,server,build,testing).
- One module graph, one registry:
Patch Changes
- Updated dependencies [
ad6fe59,429d477]:- @typestyles/build-runner@0.8.0
0.5.9
Patch Changes
- Updated dependencies [
6b862ab,1266ee6]:- @typestyles/build-runner@0.7.0
0.5.8
Patch Changes
- Updated dependencies [
c894838]:- @typestyles/build-runner@0.6.4
0.5.7
Patch Changes
#287
7979a45Thanks @dbanksdesign! - Build with tsdown (via Vite+) instead of tsup. Public exports and types are unchanged; the output no longer includes JSDoc comments, and@typestyles/nextnow shares code between its entry points instead of duplicating it.Updated dependencies [
7979a45]:- @typestyles/build-runner@0.6.3
0.5.6
Patch Changes
#282
612537eThanks @dbanksdesign! - Point the repository metadata at the phthalo-dev GitHub organization.Updated dependencies [
612537e]:- @typestyles/build-runner@0.6.2
0.5.5
Patch Changes
- Updated dependencies [
31872bc]:- @typestyles/build-runner@0.6.1
0.5.4
Patch Changes
- Updated dependencies [
35afeef]:- @typestyles/build-runner@0.6.0
0.5.3
Patch Changes
- Updated dependencies [
cf3f66c]:- @typestyles/build-runner@0.5.3
0.5.2
Patch Changes
- Updated dependencies [
41155b0]:- @typestyles/build-runner@0.5.2
0.5.1
Patch Changes
- Updated dependencies [
de79e3a]:- @typestyles/build-runner@0.5.1
0.5.0
Minor Changes
- #97
468375cThanks @dbanksdesign! - Add shared convention entry discovery across Rollup, esbuild, and webpack plugins; ship@typestyles/esbuildand@typestyles/webpack; extend discovery to.jsentry files; add Vue, Svelte, esbuild, and Parcel examples with build verification.
Patch Changes
- Updated dependencies [
468375c,e17b8a0,f5b9c6d]:- @typestyles/build-runner@0.5.0