How to differentiate between a static and template JS
.
What is the advantage of webpacking templated JS? It seems as though this creates a system in which the bundled dependencies have to refer back to the backend to load the templates.
If there is a performance win in packing templated JS then looking at it makes sense. Otherwise it may make sense to put off until it is clear that the templated files should be dealt with by either de-templating them or bundling them where there is a clear reason.
However, we're wondering about possible performance penalties with templating larger files (as opposed to templating on-demand.) Since jinja templates can execute arbitrary python, this could get time expensive and further slow things like initial page-load.
Another concern is: what happens when a template gets out of date (e.g. if browser.js had previously filled in the content for 'panel_item.content' and had been cached, would it render a new version with the new values when needed? Or is it possible that we would get old content?)
Taks remaining:
1.
Fix local variables which are declared without using var, have to check in each file
by
running eslint (For now, i will fix only errors which are giving error in browser).
2.
Move non-template files from ’templates’ to ’static’ directory. List of