You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Let me start by saying I don't understand what the purpose or benefit of this library is. I started off trying to use it and then just wrote my own webpack config. Since then, I've realised this bundle is entirely backwards. The front-end world is moving towards components à laStorybook and that's a good thing because it guarantees everything you see on a page can be reused. In order to achieve that, every little thing on a page, like a button, is a component and everything needed to render that component, including its appearance and behaviour, is packaged together. When a component is included, all its required CSS and/or JS is copied into the page automatically. How does this bundle facilitate web components? It doesn't. In fact, it's backwards because it tries to spit out a bunch of static pre-configured group of static asset files meaning you have to figure out - separately from whatever components you've included - which assets are needed for that page by yourself.
What is needed is a way to include lots of small Twig components - the building blocks of your front-end - and signal to webpack which ones we've included so it can automatically include the necessary assets for that page. Ideally, at compile time for a top-level Twig page, webpack should be collecting the list of component assets needed for that page and outputting a single resource to include on that page (or pair of resources, one for CSS and one for JS). I don't know if that's possible, but anything short of that doesn't seem particularly useful to me.
The text was updated successfully, but these errors were encountered:
Let me start by saying I don't understand what the purpose or benefit of this library is. I started off trying to use it and then just wrote my own webpack config. Since then, I've realised this bundle is entirely backwards. The front-end world is moving towards components à la Storybook and that's a good thing because it guarantees everything you see on a page can be reused. In order to achieve that, every little thing on a page, like a button, is a component and everything needed to render that component, including its appearance and behaviour, is packaged together. When a component is included, all its required CSS and/or JS is copied into the page automatically. How does this bundle facilitate web components? It doesn't. In fact, it's backwards because it tries to spit out a bunch of static pre-configured group of static asset files meaning you have to figure out - separately from whatever components you've included - which assets are needed for that page by yourself.
What is needed is a way to include lots of small Twig components - the building blocks of your front-end - and signal to webpack which ones we've included so it can automatically include the necessary assets for that page. Ideally, at compile time for a top-level Twig page, webpack should be collecting the list of component assets needed for that page and outputting a single resource to include on that page (or pair of resources, one for CSS and one for JS). I don't know if that's possible, but anything short of that doesn't seem particularly useful to me.
The text was updated successfully, but these errors were encountered: