Files
new-website-jekyll-theme/_includes/pack.html
2025-04-15 10:12:43 -03:00

18 lines
439 B
HTML

---
env:
type: 'string'
default: 'development'
outputs:
type: 'hash'
---
{%- render 'script.html', src: 'assets/js/env.js' -%}
{%- if env == 'production' -%}
{%- for pack in outputs -%}
{%- unless pack[1] contains 'entryPoint' -%}{%- continue -%}{%- endunless -%}
{%- assign src = pack[0] -%}
{%- render 'script.html', src: -%}
{%- endfor -%}
{%- else -%}
{%- render 'script.html', src: 'pack.js' -%}
{%- endif -%}