I have a component file that I only want to load once in my Volt project. Loading more than once will cause problems, similarly to loading the OpalRb library more than once. To clarify, I am loading this component file in a view file, and it keeps getting loaded because the line loading the component file keeps getting called every time the page gets hit:
{{ if condition }}
{{ require 'component/lib/file' # this line keeps getting called }}
{{ end }}
How do I set up my code so that I can load a component file only once?
Here is an example of my problem: https://gist.github.com/ylluminarious/f5ed3741d08528d87d26