You are reading the documentation for version 0.6, which is not the latest release.
Subpath exports
| Specifier | What it provides |
|---|---|
@mars-tech/vite-debug-plugin | Default export only: the plugin factory. CJS-callable (const mtDebug = require('@mars-tech/vite-debug-plugin') returns the function). |
@mars-tech/vite-debug-plugin/helpers | All named exports: DEFAULT_COLORS, DEFAULT_PREFIX, DEFAULT_GLOBAL_NAME, plus every MT* type. |
@mars-tech/vite-debug-plugin/eslint | ESLint flat config declaring the $debug global (default export), plus the mtDebugFlatConfig(opts) and mtDebugGlobals(name?, access?) helpers. See Usage. |
@mars-tech/vite-debug-plugin/testing | Test-runner setup: importing it installs a no-op $debug; also exports installMtDebugStub(opts). See Testing. |
@mars-tech/vite-debug-plugin/testing/log | The setup module testLog: true auto-registers: it installs the real console logger. Registered for you; you don't import it directly. See Seeing $debug output in tests. |
@mars-tech/vite-debug-plugin/client | Triple-slash reference target for the $debug global type augmentation. |
ts
import mtDebug from "@mars-tech/vite-debug-plugin";
import {
DEFAULT_COLORS,
type MTLevel,
} from "@mars-tech/vite-debug-plugin/helpers";The MT* types exported from /helpers include MTLevel, MTCallOptions, MTPluginOptions, MTDebug (the global: callable plus runtime controls and helpers) and MTColorMap. They are used, for example, to declare a custom globalName.