Member-only story
Building a TypeScript-Compatible Webpack Loader: A PlantUML Mind Map Example

Originally published at https://hopefullysurprising.com.
In the historical book “The Pragmatic Programmer”, there has always been an entire chapter dedicated to the importance of the ability to process text files of various formats quickly and efficiently (see “The Basic Tools: Text Manipulation”). The ability to use different text formats in various situations has always been essential and likely will continue to be.
For example, while JSON notation is super useful in many contexts, in some use cases, such as creating mind maps, another format might be much better. For example, PlantUML’s mind maps might be a more preferable option for storing serialised trees.
That’s what we will implement — store this tree-structured data as text in PlanUML format and use it in a JS app.
Quick links
Vision
Although parsing files at runtime might be a good idea, another option might be even more beneficial. If we can integrate loading with the building process, we will be able to ensure that the data required for running the app is a part of the bundle and doesn’t require passing non-common…