uwe-app / app

Universal web editor
https://uwe.app
0 stars 0 forks source link

Web components integration #249

Open tmpfs opened 3 years ago

tmpfs commented 3 years ago

We need this for plugins to offer more complex formats and support style encapsulation, see: https://web.dev/declarative-shadow-dom/ for upcoming official browser support in Chrome.

tmpfs commented 3 years ago

I think combining the ideas in https://stenciljs.com/ with a custom compiler built using the swc library could be the way forward here.

We get the web standards compatibility using web components as the build target but get the benefits of using Typescript with JSX for authoring.

These components could be integrated with the plugin system so they could be compiled ahead of time and then referenced like any other HTML element in either HTML or Markdown pages.

@chrism, i wonder what your thoughts are on this approach?