Oleksii Koshkin
Nov 27, 2023

--

Very good article, thank you!

As someone who created several micro-frontend approaches years before Webpack (can't resist praising myself), I solved such a problem with a module-in-the-middle or re-export pattern.

If you need to use some icon in your app and your app is large enough to be developed by multiple people/teams, and has a design system for example, it is better to have explicit asset management. So, just create a separate module that will include only the required icons (may be using absolute paths in Webpack case), either manually created or imported, and then import the icons from there. Either way, it will be much more convenient for designers and things like design books/storybooks.

Of course, it only works great for isolated fragments like icons. But in this way you can even serve the entire set of your own UI kit.

--

--

Oleksii Koshkin
Oleksii Koshkin

Written by Oleksii Koshkin

AWS certified Solution Architect

Responses (1)