Tags: perki/backloop.dev-vite
Tags
Claim the shared flag so backloop.dev does not repeat this Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Bump to 2.1.1 for the single-warning change A Vite project loaded both packages and each said the same thing in turn. The published build now claims a shared flag so backloop.dev does not repeat it; sixteen lines become eight. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claim the shared flag so backloop.dev does not repeat this Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Say, on npm only, that npm is no longer where this is updated This branch exists to be published. It is main plus this one file, and it must stay that way. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Load the certificate in the hook, not at import `vite build` failed outright, and had for a while: Error [ERR_REQUIRE_ASYNC_MODULE]: require() cannot be used on an ESM graph with top-level await. Vite loads vite.config.js with require(). The config imports this plugin, the plugin imported `backloop.dev`, and that package's ESM entry awaits the certificate at the top level — so the config could not be loaded at all on Node 22 or later. `apply: 'serve'` never helped: it gates the hooks, and by then the import has already run. Even where it did load, a production build downloaded a certificate it had no use for, which since 4.0.0 also means it needed a secret to build. Loading through the CommonJS entry inside the `config` hook fixes both: no top-level await in the graph, and nothing fetched unless the dev server is actually starting. Verified both ways — `vite build` completes with no request made, `vite dev` serves HTTPS on *.backloop.dev with a valid handshake. Not a regression from the 2.0.0 split: 1.0.12 against backloop.dev v3 fails identically. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>