All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Upgraded to esbuild 0.24.0. This requires you to reconfigure the
build.js
file. An example can be found inexample_project/assets/build.js
.
- Added the option to disable SSR through a config variable Issue 144
- Updated :nodejs to
3.1
- Fixed an issue where the
SvelteHook
wasn't updated when pulling in0.13.2
- Fixed an issue where the Svelte component would flicker on navigation: Issue 125
- Stopped silently failing json encoding errors: Issue 113
- Added flake setup with direnv
- Memory leak issue
- Explicitly set npm install folder fixes package.json on Windows
- Properly support binary for SSR
- Started work on a plugable SSR renderer PR
- Async and improved setup tasks
- Must now provide the
socket
when rendering in a LiveView PR
- Fixed some TypeScript definitions
This update involves some breaking changes laid out in PR.
Most of these changes should be resolved by running mix live_svelte.setup
.
Manual migration guide:
- Use
export let live; live.pushEvent();
instead ofexport let pushEvent; pushEvent();
, example is available in the readme - Update the
build.js
file by settingoptsServer.outdir
tooutdir: "../priv/svelte"
- Update the
build.js
file by settingcompilerOptions
to include{dev: !deploy, ...}
- Add
/priv/svelte/
to your.gitignore
file - Replace the
server.js
file
- Add "browser" to client esbuild conditions for svelte 4
- Add typescript definitions
- Added dev option in compilerOptions
- Move ssr build from
priv/static/assets
intopriv/svelte
- Use
export let live
instead ofexport let pushEvent
andexport let pushEventTo
allowing for a more broad use of LiveView JS interop.
- Json and liveJsonData variables in getLiveJsonProps were missing declaration specifier. The code was not working in strict mode.
- Fixed issue where compilerOptions.css was incorrectly configured.
- Hydrate should be true only if there was ssr involved, was getting errors about it, added data-ssr attribute to indicate server rendering.
- Simplified
get_svelte_components
- Cosmetic changes
- Support for Svelte 4
- Added support for
live_json
- Added LiveSvelte Components Macro - PR
- Support LiveView 0.19
- Added
pushEventTo
- Install instructions on importing LiveSvelte inside
html_helpers
so<.svelte />
is possible.
- Deprecated
LiveSvelte.render
in favor ofLiveSvelte.svelte
- Now we're using
<.svelte />
instead of<LiveSvelte.render />
in the examples
- Fixed an issue where sometimes NPM packages don't import.
- Added
~V
sigil for using Svelte as an alternative DSL for LiveView - Added ability to use
$lib
inside Svelte components like:import Component from "$lib/component.Svelte"
- Removed duplicate minify in
build.js
build.js
file addstsconfig.json
configuration
- Start of the changelog
- End-To-End Reactivity with LiveView
- Server-Side Rendered (SSR) Svelte
- Svelte Preprocessing Support with svelte-preprocess
- Tailwind Support
- Dead View Support
- Slot Interoperability (Experimental)