vite-plugin-enter-dev
v0.0.16
Published
A Vite plugin for development enhancements
Downloads
228,528
Maintainers
Readme
vite-plugin-enter-dev
Version 0.0.15 recognizes TypeScript as, satisfies, angle-bracket assertions,
and non-null assertions around plugin expressions and options without removing
them from the configuration. Compiler ownership and conditional branches remain
unchanged. The conditional PWA incident configuration is retained as a regression
fixture, alongside real Vite development/production checks.
Version 0.0.12 preserves the host React compiler and its Babel options. Use
enterDevPlugin({ react: false }) alongside @vitejs/plugin-react; Enter adds
source locations through api.reactBabel. Templates without a host compiler
can keep enterDevPlugin(). Duplicate React compilers fail at configuration
resolution with an actionable error instead of serving broken entry modules.
vite-plugin-enter-dev/configure exports configureVite(source) and
configureViteFile(path, check?). The Gateway uses these to repair existing
and imported Vite configurations. Migration preserves host options, handles
static configurations and aliased imports, and is idempotent. Unsupported
dynamic configurations fail without changing the file; check mode never writes.
File migration requires the caller to exclude concurrent file writers for the
whole operation; the Gateway holds and drains its workspace lock before calling.
Version 0.0.11's reload-generation recovery remains enabled: served documents compare the server instance and reload revision on initial HMR connection and reconnection, reloading once when stale.
Preview instrumentation is installed before application scripts and resources.
Early script, stylesheet, image and link failures are buffered for the Sandbox
collector. During development, a Vite-processed module listens to the official
HMR lifecycle and publishes enter:preview-update with build-start,
build-end or build-error; the latest signal is retained for late Sandbox
initialization. Production HTML does not contain this HMR module. These changes
require upgrading this package and restarting Vite in existing sandboxes.
Worker failures use the same runtime diagnostics. The early probe buffers them until the Sandbox collector takes over; workers created before that handoff remain observable. Collection preserves application error handlers and does not infer an HTTP status from an opaque worker error. Older plugins gain capture for new workers when the updated Sandbox collector initializes; document-start capture requires publishing and upgrading the plugin.
Run pnpm test, pnpm lint, and pnpm typecheck in this package. Tests compile
a real TSX entry through Vite and verify source annotations, migration, and
host Babel options.
Publish 0.0.16 before deploying a Gateway requiring it. Existing sandboxes must upgrade the package, migrate the configuration, and restart Vite; the Gateway checks this even when the old server's readiness endpoint still responds.
Version 0.0.16 supports conditional spreads and nested plugin arrays while preserving development/build branches. Equivalent pure conditions are matched only when their referenced bindings are stable and shared; ambiguous compiler ownership still fails explicitly.
