DEV Community

Discussion on: It's not about Web Components vs. React

 
steveblue profile image
Stephen Belovarich

I find this very interesting as someone who codes a lot of build tooling when something doesn't exist. Tools like create-react-app and Angular CLI only really serve generic use cases. The moment you want to do something else the tool doesn't you most likely have to roll your own, or extend the tool as is the case with Angular CLI.

It takes a lot of time to roll your own, so I sympathize, but if there were a tool for bundling Web Components it probably would only handle the most generic use cases.

My current workflow can be cherry picked from Readymade UI, a web component SDK I've been building just for kicks.

github.com/readymade-ui/readymade

My dev build is currently just TypeScript. I run tsc in --watch mode. In TypeScript 3.3 --watch is using an incremental watcher by default.

typescriptlang.org/docs/handbook/r...

The dev build isn't bundled, but I like that. It's fast.

The prod build uses rollup because well rollup is so easy to configure compared to anything else for me. Then I postprocess the output even more with PostHTML. PostHTML is a wonderful tool that transforms HTML templates. That's how I inlined nearly everything in the Github pages documentation for Readymade UI.

readymade-ui.github.io/readymade/

HTML Modules are coming and they will be a game changer.

Thread Thread
 
jaredmahan profile image
Jared Mahan

Have you guys taken a look at Stencil?(stenciljs.com/docs/introduction)

Thread Thread
 
steveblue profile image
Stephen Belovarich

Stencil 👍