package
Build-time plugins for nostics: strip diagnostics from production builds and collect them during dev
npm install @nostics/unpluginGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
Build-time plugins for nostics, built with unplugin.
pnpm add -D @nostics/unplugin@nostics/unplugin/strip-transformFor library authors: marks defineDiagnostics() calls as pure and guards diagnostic call sites with process.env.NODE_ENV !== 'production' so diagnostics tree-shake out of production builds.
// vite.config.ts
import { nosticsStrip } from '@nostics/unplugin/strip-transform'
export default defineConfig({
plugins: [nosticsStrip.vite()],
})Adapters for other bundlers are available via .rollup(), .rolldown(), .webpack(), .rspack(), .esbuild(), and .farm().
@nostics/unplugin/dev-server-collectorFor app developers: listens on the Vite dev-server WebSocket for diagnostics emitted by createDevReporter() in the browser and appends them as NDJSON to a local log file.
// vite.config.ts
import { nosticsCollector } from '@nostics/unplugin/dev-server-collector'
export default defineConfig({
plugins: [nosticsCollector.vite()],
})Note: Vite only. Other unplugin adapters are no-ops.
MIT
posva
posva13@gmail.com
Estimated unpacked size across 12 packages.
3.6 MB
Includes dependencies.
3 direct · 1 outdated