...
If we go by this approach then preview plugin requires changes as it will break while rendering question with formula if katex library is not present.
2. Remove/Add katex dependencies
...
to QuestionUnit Plugin
...
at runtime without changing manifest:
When StageManager invokes the ecml generation method of questionset plugin and none of the questions present on those stages has the formula
flag with value true in their body,then remove the katex library dependencies and generate ecml.
...