Skip to Content
📌 Documentation for @hyperse/inspector  and related packages.
ConfigurationNext.js plugin

Next.js plugin (@hyperse/next-inspector)

The default export is a higher-order function that accepts PluginOptions and returns withNextInspector(nextConfig?).

import withNextInspector from '@hyperse/next-inspector/plugin'; export default withNextInspector({ projectCwd: process.cwd(), trustedEditor: 'cursor', customLaunchEditorEndpoint: '/hps_inspector', keys: ['$mod', 'i'], })(/* nextConfig */);

Options (PluginOptions)

OptionDescription
projectCwdProject root for resolving file paths. Default process.cwd().
trustedEditorPreferred editor id (see TrustedEditor enum). Default code.
keysHotkey chords for the injected client (same semantics as <Inspector keys />).
injectClientAuto-inject inspector entry. Default true.
customLaunchEditorEndpointAPI route base path. Default /hps_inspector. Must match client + route file.
hideConsoleSuppress promotion logs. Default false.
hideContextSuppress page-context logs. Default false.
hideDomPathAttrHide DOM path attributes. Default true.
disableHard-disable inspector (auto true in production).

The plugin also registers the SWC wasm plugin @hyperse/inspector-swc-plugin.

Ensure your App Router exposes a route handler at the same path as customLaunchEditorEndpoint (see examples/example-nextjs in the repo).

Last updated on