Home

Awesome

ClojureScript preprocessor for Svelte using Squint

Counter.svelte

<script lang="cljs">
  (def counter 0)

  (defn increment []
    (set! counter (inc counter)))
</script>

<button on:click={increment}>
  count is {counter}
</button>

Install

npm install -D svelte-preprocess-cljs

add to svelte.config.js

import { vitePreprocess } from "@sveltejs/vite-plugin-svelte";
import { cljsPreprocess } from "svelte-preprocess-squint";

export default {
  preprocess: [cljsPreprocess(), vitePreprocess()],
};