Community
Chat Logs
Tuesday, May 26, 2026
- * phaleth joined #primate
- bluehi phaleth
- phalethhi blue
- phalethhttps://jsx.lol/
- phalethyet another https://html.kitajs.org/
- nevetKita Html - Super-fast JSX Runtime
- bluephaleth: LOL
- blueI was thinking that poly should not do JSX
- blue<if condition={true}>{"hi"}</fi>
- blue<for of={[1, 2]} as=yo>{yo}</for>
- phaleth${true ? "hi" : ""}
- blue<for in={foo: "bar"} as=[key, value]>{key}</a>
- phaleth${[1, 2].forEach(yo => `${yo}`)}
- phalethis there forEach in JS? I forgot
- blueyes
- blueyeah but it's always been a crutch. because you kinda have full JS at your disposal, but then you don't
- bluethe realiyt is you don't need full JS in the <template>
- blueyou only need a useful subset
- phalethanyway, did yout hink about running the svelte code through the esbuild-plugin to just solve the problem that the website has?
- phalethi mean esbuild-svelte plugin or whatever it's called
- bluethat's unnecessary
- blue@primate/svelte already does everything esbuild-svelte does
- phalethI like that svelte lets me use full JS
- phalethsame for JSX
- phalethuh
- blueyes but ideally you're never gonna write a full program
- blueinside your if tag
- blueyou just need a bit of logic
- blueI'm kinda having fun with marko
- blueprimate 0.39 is going to have full support for it
- blueI think you'd kinda like marko, might even switch to it from svelte for the website
- phalethtry to read through that https://primate.run/app-5ZNSRVCY.js I think bundlers can purge half of the thing
- bluelol
- bluemost of it is svelte garbage, anyway
- phalethyeah, I think esbuild-svelte gets rid of a lot of that
- bluebut we already have an esbuild plugin for svelte, it does the minimum amount of work necessary. or are there any additional flags we're missing?
- phalethif marko produces smaller bundle but is still sort of component or partial template based then I guess we could use that
- phalethyou mean esbuild flags? I don't think so
- blueno I mean, svelte flags
- phalethI'm just thinking that svelte needs to be preprocessed for production
- blueso let's add that to @primate/svelte if it's missing
- phalethI was looking at the svelte compiler flags and non of those made any difference
- phalethyeah, would be great if you could do that, to me it seems impossible
- blueso @primate/svelte contains an esbuild svelte plugin
- bluewhich probably does exactly the same thin gin the end like esbuild-svelte
- phalethit just runs the compiler I think
- phalethand the compiler adds in a lot of cruft
- phalethfor dev that idea is fine
- blueif you look here, this is almost the same as what we do
- bluehttps://github.com/EMH333/esbuild-svelte/blob/main/index.ts
- bluealso some source map support but that's irrelevant for production
- bluethere's nothing you're gonna gain from using esbuild-svelte, except for relying on someone else's code, which is almost always bad
- blueif you need support for preprocessing, we can add it, and that would mostly amount of passing an option to @primate/svelte and then calling `preprocess`, though what would you gain from? ts is already nativel supported in svelte 5
- bluewe'd only need it if we wanted support for additional template engines like pug or scss or so, all garbage in its own right
- phalethimport sveltePlugin from "esbuild-svelte";
- phalethimport { sveltePreprocess } from 'svelte-preprocess';
- phaleth preprocess: sveltePreprocess(),
- phaleth app.plugin("client", sveltePlugin({
- phaleth }));
- phalethit's two things
- blueyeah but the preprocessor isn't for optimising the build. it's for supporting magical stuf flike postcss and friends
- phalethI don't really exactly know, but I don't think svelte based sites ship extra 23 gzipped KBs
- bluehttps://github.com/sveltejs/svelte-preprocess
- nevetGitHub - sveltejs/svelte-preprocess: A ✨ magical ✨ Svelte preprocessor with sensible defaults and support for: PostCSS, SCSS, Less, Stylus, Coffeescript, TypeScript, Pug and much more.
- blue"Historically, svelte-preprocess was the go-to option whenever you had a language other than JS/HTML/CSS used inside your Svelte files. Today, depending on your setup, you may no longer need it:"
- phalethheh, magical, it's all magical
- blue"If you're using Svelte 5 and are only using type features of TypeScript (i.e. things that just "go away" after transpiling to JS), you don't need any preprocessor, Svelte handles this natively
- blue"
- bluebelieve me, we're gonna gain nothing from this nonsense, I've been over these packages and they're a bunch of cruft
- blueunless we wanna support scss or coffeescript or pug, of all which are useless
- phalethbut still why is there half the unnecesary JS in the final bundle
- blueI don't know, but I doubt using esbuild-svelte or svelte-preprocess is gonna influence that
- phalethI don't think the compiler just optimizes the output
- blueI can't see any magical things they do that we don't do
- phalethso then all esbuild based svelte sites ship extra JS
- phaleththat makes rollup the tool of choice for prod builds
- phalethor rolldown or whatever is the thing nowadays
- blueI doubt that. though if anything unneeded is pulled in, that would be primate's fault and not esbuild's
- phalethI'm just thinking that cause I remember hello world in svelte was 9 kBs back in the day
- blueand then rollup wouldn't do a better job at it, anyway
- phalethyeah, but if you look at that app bundle the first half of it is no primate at all
- phalethand also why make a new framework if svelte is fine :D
- bluewhich part? the svelte error messages?
- phalethyeah, prolly, it's like all the svelte features that are not used are included
- phalethI gotta go, see ya
- blueciao
- * jreicher joined #primate