Security News
ESLint is Now Language-Agnostic: Linting JSON, Markdown, and Beyond
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
@solid-devtools/transform
Advanced tools
Babel plugin for transforming SolidJS code in development to enchance solid-devtools usage.
A babel transform plugin for vite for transforming Solid code. For development — debugging purposes only.
It can do very useful things for you: Wrap stores to let the debugger observe them. Automatically name signals, memos and stroes. It's also required by the Locator package to allow for going to the source code of the components.
npm i -D @solid-devtools/transform
# or
yarn add -D @solid-devtools/transform
# or
pnpm i -D @solid-devtools/transform
// vite.config.ts
import { defineConfig } from 'vite'
import solid from 'vite-plugin-solid'
import devtools from '@solid-devtools/transform'
export default defineConfig({
plugins: [devtools(), solid()],
})
By default the plugin will only inject the debugger and extension client script to the page. (If installed)
All of the other transforms are disabled by default—you need to pick what you want by enabling correlated option.
interface DevtoolsPluginOptions {
/** Add automatic name when creating signals, memos, stores, or mutables */
autoname?: boolean
locator?:
| boolean
| {
/** Choose in which IDE the component source code should be revealed. */
targetIDE?: Exclude<LocatorOptions['targetIDE'], TargetURLFunction>
/**
* Holding which key should enable the locator overlay?
* @default 'Alt'
*/
key?: LocatorOptions['key']
/** Inject location attributes to jsx templates */
jsxLocation?: boolean
/** Inject location information to component declarations */
componentLocation?: boolean
}
}
// in vite.config.ts plugins array:
devtools({
autoname: true,
locator: {
targetIDE: 'vscode',
key: 'Ctrl',
jsxLocation: true,
componentLocation: true,
},
})
autoname
This option adds automatic name to signals, memos, stores, and mutables. Those names will be visible in the devtools when inspecting.
locator
This option enables the locator feature. The key
and targetIDE
are going to pe passed to useLocator
function call.
locator.componentLocation
Inject location information to component functions. This will add a button in the devtools inspector panel, allowing you to go to the source code of the component.
locator.jsxLocation
Inject location attributes to jsx templates. This is required for the debugger's locator feature.
See CHANGELOG.md.
FAQs
Babel plugin for transforming SolidJS code in development to enchance solid-devtools usage.
We found that @solid-devtools/transform demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
Security News
Members Hub is conducting large-scale campaigns to artificially boost Discord server metrics, undermining community trust and platform integrity.
Security News
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.