Should use :init-fn instead of having html emit a function call. :init-fn ensures the function is called when the JS file is loaded and enables using <script async>. Didn't change that part but it is recommended.
Also removed the :after-load from the build config since it is recommended to use metadata hooks.
Should use
:init-fn
instead of having html emit a function call.:init-fn
ensures the function is called when the JS file is loaded and enables using<script async>
. Didn't change that part but it is recommended.Also removed the
:after-load
from the build config since it is recommended to use metadata hooks.