Using TypeScript and Web Components without bundling, with Deno
My simple Deno website boilerplate now includes client-side bundle-less Web Components with TypeScript.
tl;dr; You can see an example of using a Web Component in my simple Deno website boilerplate. You can also see the code for it.
It's no surprise I've been quite enamored with Deno and the old-school techniques of building apps and websites, especially the idea of not bundling and not using frameworks.
There's a lot to like, from the lack of large dependencies (in number and size), to the speed of deployment (it's literally up and available in production in a few seconds, as there's no build step!). It's also incredibly easier to maintain.
Why Web Components?
Then, one arguable benefit from React and other user interface libraries (or frameworks), is that you can build reusable components, but I've found React to quickly lose performance on more complicated UIs, and I don't like all the boilerplate and client-side code it requires, so, as expected, I looked into Web Standards, and that's where Web Components are helpful and beautiful!
If you give it a try, you'll see you can get a lot of the benefits people generally associate with React or Vue, without any library!
By allowing Just-In-Time (JIT) TypeScript transpile, we can then build a really nice Web Component, like what I have in my simple Deno website boilerplate, (and this is how it's loaded).
I hope you enjoy it.
Thank you for your attention and kindness. I really appreciate it!