3 ms·
The only way to get out of the current front end hell IMO is if we get client side import: https://github.com/whatwg/html/issues/2791 https://github.com/whatwg
by candiddevmike 2y ago
The only way to get out of the current front end hell IMO is if we get client side import:
https://github.com/whatwg/html/issues/2791 https://github.com/whatwg/html/issues/2791
- askonomm 2y agoI mean <script type="module"></script> can do ECMAScript module imports.
- meiraleal 2y agoThat's a solved problem. You can create a custom element for that with some 5 lines of code. Or use one ready: https://github.com/justinfagnani/html-include-element https://github.com/justinfagnani/html-include-element
- arcbyte 2y agoI'm aghast at the comments in that thread. They are truly asleep at the wheel. No wonder the front end is such a disaster with those mindsets running the show.
- lelanthran 2y ago> I'm aghast at the comments in that thread. They are truly asleep at the wheel. And the wheel that they're at is the one in a clown car. Which is driving off a cliff. Just having a custom element `<my-include-html remote-src='...'>`[1] is enough to forgo 50% of the reason for using a front-end framework with a build-step. [1] One that executes scripts, allows `<style>` tags, etc.
- halfcat 2y agoWould this be different from using HTMX to load an HTML partial on page load? Something like: <div hx-trigger="load" hx-get="/header.html"></div>