I have a working proof of concept of code splitting in HubSpot - functions similar to the way es6 imports work but using HubL, a global module to store the code, placing it in a template with export to template context, a macro that will be useful to move this proof of concept along further.
I have code sample and video walk through of this in action on my LinkedIn
https://www.linkedin.com/posts/nickodecker_some-thoughts-anyone-know-of-a-potential-activity-7316509395796852736-9UnL?utm_source=share&utm_medium=member_ios&rcm=ACoAAAFJeSMBueNrDfx40aUsSB97Awx6KoOWTbo