Passage de webpack à vite.dev

This commit is contained in:
2024-11-19 01:56:55 +01:00
committed by Bartuccio Antoine
parent 7b41051d0d
commit 8a8851847c
28 changed files with 1565 additions and 2818 deletions

View File

@ -14,18 +14,19 @@
{% block jquery_css %}
{# Thile file is quite heavy (around 250kb), so declaring it in a block allows easy removal #}
<link rel="stylesheet" href="{{ static('bundled/jquery-index.css') }}">
<link rel="stylesheet" href="{{ static('bundled/jquery-ui-index.css') }}">
{% endblock %}
<link rel="preload" as="style" href="{{ static('bundled/fontawesome-index.css') }}" onload="this.onload=null;this.rel='stylesheet'">
<noscript><link rel="stylesheet" href="{{ static('bundled/fontawesome-index.css') }}"></noscript>
<script src="{{ url('javascript-catalog') }}"></script>
<script src={{ static("bundled/core/components/include-index.ts") }}></script>
<script src="{{ static('bundled/alpine-index.js') }}" defer></script>
<script src="{{ static('bundled/htmx-index.js') }}" defer></script>
<!-- Jquery declared here to be accessible in every django widgets -->
<script src="{{ static('bundled/jquery-index.js') }}"></script>
<!-- Put here to always have access to those functions on django widgets -->
<script type="module" src={{ static("bundled/core/components/include-index.ts") }}></script>
<script type="module" src="{{ static('bundled/alpine-index.js') }}"></script>
<script type="module" src="{{ static('bundled/htmx-index.js') }}"></script>
<!-- Jquery declared here to be accessible in every django widgets -->
<script src="{{ static('bundled/vendored/jquery.min.js') }}"></script>
<script src="{{ static('bundled/vendored/jquery-ui.min.js') }}"></script>
<script src="{{ static('core/js/script.js') }}"></script>

View File

@ -7,7 +7,7 @@
{%- endblock -%}
{% block additional_js %}
<script src="{{ static("bundled/user/family-graph-index.js") }}" defer></script>
<script type="module" src="{{ static("bundled/user/family-graph-index.js") }}" defer></script>
{% endblock %}
{% block title %}

View File

@ -5,7 +5,7 @@
{%- endblock -%}
{% block additional_js %}
<script src="{{ static('bundled/user/pictures-index.js') }}" defer></script>
<script type="module" src="{{ static('bundled/user/pictures-index.js') }}" defer></script>
{% endblock %}
{% block title %}

View File

@ -1,5 +1,5 @@
{% for js in statics.js %}
<script-once src="{{ js }}" defer></script-once>
<script-once type="module" src="{{ js }}" defer></script-once>
{% endfor %}
{% for css in statics.css %}
<link-once rel="stylesheet" type="text/css" href="{{ css }}" defer></link-once>

View File

@ -1,5 +1,5 @@
<div>
<script-once src="{{ statics.js }}" defer></script-once>
<script-once type="module" src="{{ statics.js }}" defer></script-once>
<link-once rel="stylesheet" type="text/css" href="{{ statics.css }}" defer></link-once>
<markdown-input name="{{ widget.name }}"{% include "django/forms/widgets/attrs.html" %}>{% if widget.value %}{{ widget.value }}{% endif %}</markdown-input>

View File

@ -1,4 +1,4 @@
<script-once src="{{ statics.js }}" defer></script-once>
<script-once type="module" src="{{ statics.js }}" defer></script-once>
<link-once rel="stylesheet" type="text/css" href="{{ statics.css }}" defer></link-once>
<span>