An on-page devtools overlay for debugging SolidJS Applications without a chrome extension.
Simply add the Overlay component to your app and get access to a powerful, in-browser devtools experience during development. (It will be removed in production)
A couple of deployed demo websites where you can see the Overlay in action:
npm i @solid-devtools/overlay
# or
yarn add @solid-devtools/overlay
# or
pnpm add @solid-devtools/overlay
Simply place the overlay component in the client entry file.
import { attachDevtoolsOverlay } from '@solid-devtools/overlay'
attachDevtoolsOverlay()
// or with some options
attachDevtoolsOverlay({
defaultOpen: true, // or alwaysOpen
noPadding: true,
})
Don't worry about wrapping it with a isDev
guard, the Overlay takes care of that for you. It should be excluded from production builds automatically.
Enabling the babel plugin is optional, but can offer some extra improvements.
To enable it you need to add it to plugins array in your .vite.config.ts
file:
// vite.config.ts
import { defineConfig } from 'vite'
import solid from 'vite-plugin-solid'
import devtools from '@solid-devtools/transform'
export default defineConfig({
plugins: [
devtools({
name: true,
}),
solid(),
],
})
See CHANGELOG.md.