https://github.com/lxsmnsyc/solid-optimizer
Experimental compile-time optimizer for SolidJS
https://github.com/lxsmnsyc/solid-optimizer
optimization solid-js ssr
Last synced: 4 months ago
JSON representation
Experimental compile-time optimizer for SolidJS
- Host: GitHub
- URL: https://github.com/lxsmnsyc/solid-optimizer
- Owner: lxsmnsyc
- License: mit
- Created: 2022-09-22T15:57:25.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-03-14T07:15:17.000Z (12 months ago)
- Last Synced: 2025-03-29T08:01:35.647Z (11 months ago)
- Topics: optimization, solid-js, ssr
- Language: TypeScript
- Homepage:
- Size: 369 KB
- Stars: 21
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# solid-optimizer
> Experimental compile-time optimizer for SolidJS
[](https://www.npmjs.com/package/solid-optimizer) [](https://github.com/airbnb/javascript)
## Install
```bash
npm i -D solid-optimizer
```
```bash
yarn add -D solid-optimizer
```
```bash
pnpm add -D solid-optimizer
```
## Features
> **Warning**
> The following features are only for SSR
### Trimming no-op
The following are no-op functions in SSR, their calls are removed to enable tree-shaking unwanted code.
- `createEffect`
- `onMount`
### `untrack`, `batch` and `startTransition`
Passed argument is inlined and called synchronously. For arrow functions, if the function doesn't have the body, it's return expression is inlined instead.
### `createDeferred`
Passed argument is inlined.
### `getListener`
`getListener` calls are replaced with `null`.
## Sponsors

## License
MIT © [lxsmnsyc](https://github.com/lxsmnsyc)