Skip to content

Releases: lxsmnsyc/dismantle

v0.4.0

03 Mar 12:26
a636453
Compare
Choose a tag to compare
  • use-server-directive is now part of dismantle
    • Deprecated unplugin-use-server-directive. For Vite, use vite-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.
  • Add runtime option
    • This allows compilers like use-server-directive to re-export dismantle's runtime
  • Add idPrefix
    • Option to allow adding prefixes on produced function ids.

v0.3.0

05 Feb 06:19
4b64631
Compare
Choose a tag to compare
  • Replace functions and directives config with definitions.
    • Directive definitions now needs to be defined with a type: "block-directive"
    • Function defintions now needs to be defined with a type: "function-call"
  • Add isomorphic mode
  • Function call definitions now requires a handle config, which defines the function to be imported and called to manage the client 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

27 Jan 08:08
fb58a64
Compare
Choose a tag to compare
  • directive-splitter is now dismantle
    • 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
  • 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');
  • Renameddirectives config property import to target
  • Fixed an issue with generators not applying remote mutations.

Full Changelog: v0.1.2...v0.2.0