Install
npm install babel-plugin-solid-labels
yarn add babel-plugin-solid-labels
pnpm add babel-plugin-solid-labels
Features
π· Labels: Turn labels into SolidJS utility calls!π¬ Comments: Turn comments into SolidJS utility calls, too!β± Compile-time Functions: Use functions that are evaluated during compile-time!π¦ Auto Imports: No need to import SolidJS utilities, explicitly!π€ JS and TS Friendly!
Usage
Typescript
<any file>.d.ts
/// <reference types="babel-plugin-solid-labels" />
Babel
.babelrc
{
"plugins": [
["babel-plugin-solid-labels", { "dev": false }]
]
}
NOTE: You don't have to use this if you're using Vite or Rollup plugins
Integrations
Disabling features
You can disable some features by passing disabled
option to the plugin options.
{
disabled: {
labels: {
signal: true,
},
pragma: {
'@signal': true,
},
ctf: {
$signal: true,
},
}
}
Limitations
- Detecting shadowed identifier for
signal
andmemo
.
Sponsors
License
MIT Β© lxsmnsyc