solid-labels
January 12, 2024 ยท View on GitHub
Install
npm install solid-labels
yarn add solid-labels
pnpm add 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="solid-labels" />
Babel
.babelrc
{
"plugins": [
["solid-labels/babel", { "dev": false }]
]
}
[!INFO]: 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
signalandmemo.
Sponsors
License
MIT ยฉ lxsmnsyc