It's really a long period I have been out of touch to front-end trending, until I try to add petite-vue into our team's codebase recently. Fortunately, while our age-old project is built by JSP and LayUI which is an old fashion back-end friendly UI library, there is no need to support IE any more. During exploring the petite-vue codebase, I discovered the brand new build tooling Vite, which is a leaner and faster building solution for large front-end project base on ES module.
Up until 2015, there was no standard mechanism for code reuse. And about 7 years ago there were loads of attempts like IIFE, AMD, CommonJS and UMD trying to standardize this aspect. I had introduce seajs which implements spec of CommonJS in browser by Alibaba into my project at that moment. But there was no clear winner. Nowadays, ES module have been supported by modern browser and NodeJS natively. Wow, how time flies.
I'm sure you already know everything about ES module, so here's a quick recap about ES module in browser for myself