OneZoom/OZtree

Should static/OZTreeModule/dist/OZui.html have a <head> tag?

Closed this issue · 3 comments

We are calling

<head>
...
 {{include '../static/OZTreeModule/dist/OZui.html'}}
...
</head>

in a few layout files, but that OZui,html file (which is only to allow easy inclusion of a file with a changed name) itself includes.a <head> tag. That sounds bad to me. I wonder if it explains all those "Can't find variable OZui" errors (e.g. #801 (comment))

Also, is the {{include ...}} with a hard-coded file path the right way to do this? It would seem better to me to add it to response.files, so that we don't end up importing it multiple times. But I don't know if you can include an HTML file like that: it might just be css / js files?

Seems like we might want inject: false, and a custom template. See e.g. https://www.npmjs.com/package/html-webpack-plugin#writing-your-own-templates

Screenshot 2024-04-16 at 19 33 28

Fixed by #803