Release 0.8.0
@emberkit/core 0.8.0@emberkit/cli 1.0.0@emberkit/icons & @emberkit/ui 6.0.0
This release adds reactive effects, View Transitions, dev-time API routing, SQL raw imports, stronger hydration bindings, and fixes for loading emberkit.config.ts in the Vite plugin.
Highlights
| Area | What changed |
|---|---|
| Signals | createEffect and createMemo track dependencies and re-run when signals change |
| View Transitions | Built-in SPA transitions via render(..., { viewTransitions: true }) |
| Dev API | devApiPlugin and src/routes/_api/* file routes in development |
| Hydration | Richer data-ek-bind for inputs; guidance for async lists after SSR |
| Vite | sqlRawPlugin() for *.sql?raw imports (Workers / edge) |
Reactive effects and memos
Before 0.8.0, createEffect ran once on the client. It now:
- Tracks reads inside the effect (and inside
createMemo) - Re-runs when those signals change
- Respects
untrack()and batches notifications viabatch() - Skips execution during SSR (
windowis undefined)
import { createSignal, createEffect } from '@emberkit/core';
const [query, setQuery] = createSignal('');
createEffect(() => {
document.title = `Search: ${query()}`;
});
See Signals — Effects.
View Transitions
Enable smooth route changes with the native View Transitions API:
import { render } from '@emberkit/core';
import App from './routes/_layout.tsx';
import { routes } from 'virtual:emberkit-routes';
render(App, document.getElementById('app')!, {
routes,
viewTransitions: true,
});
Also exported: supportsViewTransitions, withViewTransition, initViewTransitions, navigateWithViewTransition, and navigate(..., { viewTransition: true }).
Full guide: View Transitions.
Dev API middleware
In development, forward /api and /api/* to a Node handler or to file-based routes under src/routes/_api/.
Option A — config:
// emberkit.config.ts
export default defineConfig({
devApi: {
handler: './src/server/api-router.node.ts',
export: 'handleApiRequestNode',
},
});
Option B — explicit Vite plugin (same behavior):
import { devApiPlugin, emberkitVitePlugin } from '@emberkit/core/vite-plugin';
plugins: [
devApiPlugin({
handler: './src/server/api-router.node.ts',
export: 'handleApiRequestNode',
}),
emberkitVitePlugin(),
];
If devApi is not set and you have src/routes/_api/* routes, file-based API routing is enabled automatically.
Details: Dev API.
sqlRawPlugin
Import SQL files as strings at build time (useful for migrations on Cloudflare Workers, where there is no filesystem):
import migration from '../migrations/001_init.sql?raw';
import { sqlRawPlugin, emberkitVitePlugin } from '@emberkit/core/vite-plugin';
plugins: [sqlRawPlugin(), emberkitVitePlugin()];
Hydration improvements
- Inputs:
data-ek-bindon<input>,<textarea>, and<select>syncs.value; buttons can binddisabled. - SSR + async lists: Hydration does not re-render
.map()lists when a signal updates. See Dynamic lists after SSR.
Vite plugin fixes (0.8.0)
emberkit.config.tsis transpiled with esbuild when the plugin loads options (fixesdevApinot applying under plain Node).- SSR dev middleware skips
/apirequests so they are not rendered as HTML pages. - API prefix matching accepts
/apiand/api/*(not only/api/...with a trailing path).
CLI 1.0.0
The CLI major version aligns with core 0.8.0. Scaffold templates pin compatible dependency ranges. No breaking CLI command changes beyond version alignment.
Migration checklist
- Bump dependencies:
@emberkit/core@^0.8.0,@emberkit/cli@^1.0.0, optional@emberkit/icons@^6.0.0/@emberkit/ui@^6.0.0. - Remove local shims if you copied
vite.dev-api-plugin.tsorvite-sql-raw.tsfrom older apps. - Add
devApiordevApiPluginfor local API routes. - Enable
viewTransitions: trueinrender()and remove custom view-transition scripts if duplicated. - For SSR pages with client-fetched lists, follow hydration guidance for dynamic lists.
Next steps
- API Reference — updated exports
- Dev API
- View Transitions
- Hydration