Skip to content

v0.7.0

Choose a tag to compare

@mareszhar mareszhar released this 26 Sep 03:29
· 10 commits to main since this release

Summary

Vanity now costs only what your application uses. It takes ownership of your system module when Vite loads it, instead of inspecting every import. On a large generated graph, the Vanity build is four times faster than in v0.6.1. Design packages installed from a registry now work exactly like workspace-linked ones, in development and SSR. Two new diagnostics make formerly silent or obscure failures actionable: a configuration that bypasses a source package, and application code that imports Vanity's authoring entry.

Fixed

  • A source package installed from a registry now works in development and SSR like a workspace-linked package. Its style modules load their CSS, the browser receives the application's system projection instead of a pre-bundled compiler copy, and SSR development runs the projection rather than the build-time system.
  • Vanity no longer adds work for every module in an application. On a generated graph with 3,000 application modules and 128 installed dependency modules, the local Vanity build fell from 1.921 s in v0.6.1 to 0.478 s, against 0.167 s for plain Vite on the same graph. These timings are local signals, not cross-machine comparisons.
  • Application auto-imports no longer parse installed dependencies.
  • Imports of configured system files preserve the host's ?raw, ?url, and other non-module query behavior.

Added

  • VANITY_VITE_SOURCE_PACKAGE_BYPASSED warns when Vite configuration would pre-bundle or externalize a package that ships or leads to Vanity source. The warning names the package and fix, and appears in Vite's log when no compiler.diagnostics sink is configured.
  • VANITY_AUTHORING_IN_APP_MODULE names the application module that imports @mszr/vanity and how to fix it. Previously the browser failed inside a Node-only package, and SSR ran build-time code.

Changed

  • Browser tools show your system module under its own file instead of a generated virtual module.
  • Vanity declares packages whose dependency graph reaches @mszr/vanity in Vite's optimizer and SSR configuration. Application auto-imports still reach workspace-linked packages.
  • On Vite 5, one vanityPlugin() instance cannot serve two hosts at the same time. Configuring a second live host raises an error that explains how to create one instance per host; sequential builds from one instance continue to work.
  • Non-error adapter diagnostics appear in the Vite log when no compiler.diagnostics sink is configured.

No upgrade action is required unless application code imports @mszr/vanity. VANITY_AUTHORING_IN_APP_MODULE now names that module. Move its authoring into compiler.system or a *.css.ts style module.