mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-22 06:03:20 +00:00
Remove defer from script where type=module is used
This commit is contained in:
parent
8a8851847c
commit
0485ab1120
@ -1,7 +1,7 @@
|
|||||||
{% extends "core/base.jinja" %}
|
{% extends "core/base.jinja" %}
|
||||||
{% block additional_js %}
|
{% block additional_js %}
|
||||||
{% if settings.SENTRY_DSN %}
|
{% if settings.SENTRY_DSN %}
|
||||||
<script src="{{ static('bundled/sentry-popup-index.ts') }}" defer ></script>
|
<script type="module" src="{{ static('bundled/sentry-popup-index.ts') }}"></script>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock additional_js %}
|
{% endblock additional_js %}
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
{%- endblock -%}
|
{%- endblock -%}
|
||||||
|
|
||||||
{% block additional_js %}
|
{% block additional_js %}
|
||||||
<script type="module" src="{{ static("bundled/user/family-graph-index.js") }}" defer></script>
|
<script type="module" src="{{ static("bundled/user/family-graph-index.js") }}"></script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
{%- endblock -%}
|
{%- endblock -%}
|
||||||
|
|
||||||
{% block additional_js %}
|
{% block additional_js %}
|
||||||
<script type="module" src="{{ static('bundled/user/pictures-index.js') }}" defer></script>
|
<script type="module" src="{{ static('bundled/user/pictures-index.js') }}"></script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{% for js in statics.js %}
|
{% for js in statics.js %}
|
||||||
<script-once type="module" src="{{ js }}" defer></script-once>
|
<script-once type="module" src="{{ js }}"></script-once>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% for css in statics.css %}
|
{% for css in statics.css %}
|
||||||
<link-once rel="stylesheet" type="text/css" href="{{ css }}" defer></link-once>
|
<link-once rel="stylesheet" type="text/css" href="{{ css }}" defer></link-once>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<div>
|
<div>
|
||||||
<script-once type="module" src="{{ statics.js }}" defer></script-once>
|
<script-once type="module" src="{{ statics.js }}"></script-once>
|
||||||
<link-once rel="stylesheet" type="text/css" href="{{ statics.css }}" defer></link-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>
|
<markdown-input name="{{ widget.name }}"{% include "django/forms/widgets/attrs.html" %}>{% if widget.value %}{{ widget.value }}{% endif %}</markdown-input>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<script-once type="module" src="{{ statics.js }}" defer></script-once>
|
<script-once type="module" src="{{ statics.js }}"></script-once>
|
||||||
<link-once rel="stylesheet" type="text/css" href="{{ statics.css }}" defer></link-once>
|
<link-once rel="stylesheet" type="text/css" href="{{ statics.css }}" defer></link-once>
|
||||||
|
|
||||||
<span>
|
<span>
|
||||||
|
@ -36,8 +36,8 @@ Pour accéder au fichier, il faut utiliser `static` comme pour le reste mais en
|
|||||||
|
|
||||||
```jinja
|
```jinja
|
||||||
{# Example pour ajouter sith/core/bundled/alpine-index.js #}
|
{# Example pour ajouter sith/core/bundled/alpine-index.js #}
|
||||||
<script src="{{ static('bundled/alpine-index.js') }}" defer></script>
|
<script type="module" src="{{ static('bundled/alpine-index.js') }}"></script>
|
||||||
<script src="{{ static('bundled/other-index.ts') }}" defer></script>
|
<script type="module" src="{{ static('bundled/other-index.ts') }}"></script>
|
||||||
```
|
```
|
||||||
|
|
||||||
!!!note
|
!!!note
|
||||||
@ -46,6 +46,11 @@ Pour accéder au fichier, il faut utiliser `static` comme pour le reste mais en
|
|||||||
Les autres fichiers sont disponibles à l'import dans le JavaScript comme
|
Les autres fichiers sont disponibles à l'import dans le JavaScript comme
|
||||||
si ils étaient tous au même niveau.
|
si ils étaient tous au même niveau.
|
||||||
|
|
||||||
|
!!!warning
|
||||||
|
|
||||||
|
Le bundler ne génère que des modules javascript.
|
||||||
|
Ajouter `type="module"` n'est pas optionnel !
|
||||||
|
|
||||||
### Les imports au sein des fichiers des fichiers javascript bundlés
|
### Les imports au sein des fichiers des fichiers javascript bundlés
|
||||||
|
|
||||||
Pour importer au sein d'un fichier js bundlé, il faut préfixer ses imports de `#app:`.
|
Pour importer au sein d'un fichier js bundlé, il faut préfixer ses imports de `#app:`.
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block additional_js %}
|
{% block additional_js %}
|
||||||
<script type="module" src="{{ static('bundled/galaxy/galaxy-index.js') }}" defer></script>
|
<script type="module" src="{{ static('bundled/galaxy/galaxy-index.js') }}"></script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block additional_js %}
|
{% block additional_js %}
|
||||||
<script type="module" src="{{ static('bundled/pedagogy/guide-index.js') }}" defer></script>
|
<script type="module" src="{{ static('bundled/pedagogy/guide-index.js') }}"></script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block head %}
|
{% block head %}
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
{%- endblock -%}
|
{%- endblock -%}
|
||||||
|
|
||||||
{%- block additional_js -%}
|
{%- block additional_js -%}
|
||||||
<script type="module" src="{{ static('bundled/sas/album-index.js') }}" defer></script>
|
<script type="module" src="{{ static('bundled/sas/album-index.js') }}"></script>
|
||||||
{%- endblock -%}
|
{%- endblock -%}
|
||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
|
@ -7,8 +7,8 @@
|
|||||||
{%- endblock -%}
|
{%- endblock -%}
|
||||||
|
|
||||||
{%- block additional_js -%}
|
{%- block additional_js -%}
|
||||||
<script type="module" defer src="{{ static('bundled/core/components/ajax-select-index.ts') }}"></script>
|
<script type="module" src="{{ static('bundled/core/components/ajax-select-index.ts') }}"></script>
|
||||||
<script type="module" defer src="{{ static("bundled/sas/viewer-index.ts") }}"></script>
|
<script type="module" src="{{ static("bundled/sas/viewer-index.ts") }}"></script>
|
||||||
{%- endblock -%}
|
{%- endblock -%}
|
||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
{% block head %}
|
{% block head %}
|
||||||
{{ super() }}
|
{{ super() }}
|
||||||
<script type="module" src="{{ static('bundled/subscription/stats-index.ts') }}" defer></script>
|
<script type="module" src="{{ static('bundled/subscription/stats-index.ts') }}"></script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
Loading…
Reference in New Issue
Block a user