Releases: lxsmnsyc/dismantle
Releases · lxsmnsyc/dismantle
v0.4.0
use-server-directive
is now part ofdismantle
- Deprecated
unplugin-use-server-directive
. For Vite, usevite-plugin-use-server-directive
- For Svelte,
"use server"
can no longer be used inside.svelte
files. - Added
use-server-directive/preload
which allows immediate server function registration on the server runtime.
- Deprecated
- Add
runtime
option- This allows compilers like
use-server-directive
to re-exportdismantle
's runtime
- This allows compilers like
- Add
idPrefix
- Option to allow adding prefixes on produced function ids.
v0.3.0
- Replace
functions
anddirectives
config withdefinitions
.- Directive definitions now needs to be defined with a
type: "block-directive"
- Function defintions now needs to be defined with a
type: "function-call"
- Directive definitions now needs to be defined with a
- Add
isomorphic
mode - Function call definitions now requires a
handle
config, which defines the function to be imported and called to manage theclient
counterpart of the function. - Function call definition transform now emits a higher-order function that returns the function instance.
- The higher order function is for performing the dynamic import required to load the registered function.
- This is useful on defining how the client counterpart should be interpreted i.e. if it should return the function or if it should perform a side-effect. Interpretation is up to the runtime implementation.
- Add
function-directive
definition.- Directive splitting applies to the function rather than the block. Output is similar to function call definition.
v0.2.0
directive-splitter
is nowdismantle
- This change in package name is because
dismantle
now offers features beyond just "directives", and so the old name doesn't reflect the features anymore. - Probably one word is better
- This change in package name is because
dismantle
now supports code-splitting by function call, see Configuration.
import { server$ } from 'my-example';
const logOnServer = server$((message) => {
console.log('Server', message);
});
await logOnServer('This logs on the server');
- Renamed
directives
config propertyimport
totarget
- Fixed an issue with generators not applying remote mutations.
Full Changelog: v0.1.2...v0.2.0