datastar/site/routes_bundler.qtpl

21 lines
620 B
Plaintext

{% func bundlerContent(manifest PluginManifest) %}
import { apply, load, setAlias } from '../engine'
{%- for _, p := range manifest.Plugins -%}
import { {%s p.Name %} } from "{%s p.Path %}"
{%- endfor -%}
{%- if manifest.Alias != "" -%}
// You included an alias in your manifest
// Please use this as a last resort as you will have to convert any issues or errors back to the original form before reporting them if you want help.
setAlias('{%s manifest.Alias %}')
{%- endif -%}
load(
{%- for _, p := range manifest.Plugins -%}
{%s p.Name %},
{%- endfor -%}
)
apply()
export { apply, load, setAlias }
{% endfunc %}