Skip to content
This repository was archived by the owner on Sep 24, 2021. It is now read-only.

1.4.0

Compare
Choose a tag to compare
@kaleidawave kaleidawave released this 19 Nov 19:06
· 35 commits to main since this release
1d9f5a0

Implemented document title binding:

Pages with the @Title decorator will now see the document title change according to the data. e.g:

<template>...</template>
<script>
    @Page("/p/:postID")
    @Title(postTitle)
    class PostPage extends Component<{postTitle: string}> {}
</script>

Rust functions now borrow by default:

Rust SSR functions data properties are marked to borrow and not consume the data. This fixed a issue around SSR head tags (title+meta).

Support for shadow DOM:

Components marked with @Shadow will now have a shadow DOM rather than a light dom. If you are distributing web components this is recommended to encapsulate internals and to prevent accidental style or JS interference. DSD is also supported through the --declarativeShadowDOM true argument.

<template>
    <h1>Hello {name}</h1>
</template>
<script>
    @Shadow
    class HelloComponent extends Component<{name: string}> {}
</script>
<style>
    h1 { color: green }
</style>

Versioned outputs:

Outputted public files (css and js for now) now contain a unique versioning id in there path. This is useful when doing caching where there may be multiple clients running multiple versions. This is only recommended for applications build under context=client as running a old script with a new SSR markup will break hydration and styling.

New testing server:

Replaced the old temporary ws approach for a inbuilt node server. Should give incredibly quick start up times. Use with --run to run the server and --run open to include opening the browser.

Runtime minifications:

Added a lot more minifications to the runtime JS. This include redoing how events are hydrated and doing binding and unbinding under the same method.