This is one of the reasons I'm such a fan of Vue.js. Using the vue-loader, you write single-file 'components' which all their included templating, logic, and style. While not EXACTLY what the promise of "Web Components"/"Custom Components" offers, it is definitely a good step forward in thinking on how to modularize all the pieces of the front-end.
https://vuejs.org/
https://github.com/vuejs/vue-loader