Repository navigation
v0.7.0
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_BYPASSEDwarns 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 nocompiler.diagnosticssink is configured.VANITY_AUTHORING_IN_APP_MODULEnames the application module that imports@mszr/vanityand 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/vanityin 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.diagnosticssink 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.