Skip to content

Commit

Permalink
Updated documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
gone committed Jun 3, 2023
1 parent 6fe2b6b commit 779ced8
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions django_vite/templatetags/django_vite.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,9 @@ def preload_vite_asset(
"""
Generates a <link modulepreload> tag for this JS/TS asset, a
<link preload> tag for all of its CSS dependencies,
and a prelodule module for the js dependencies.
In development does nothing, since files aren't compiled yet"
and a preload module for the js dependencies.
In development this template tag renders nothing,
since files aren't compiled yet"
Arguments:
path {str} -- Path to a Vite JS/TS asset to preload.
Expand Down Expand Up @@ -553,9 +554,9 @@ def vite_asset(
**kwargs: Dict[str, str],
) -> str:
"""
Generates a <script> tag for this JS/TS asset and a <link> tag for
all of its CSS dependencies by reading the manifest
file (for production only).
Generates a <script> tag for this JS/TS asset, a <link> tag for
all of its CSS dependencies, and a <link rel="modulepreload">
for all js dependencies, as listed in the manifest file
In development Vite loads all by itself.
Arguments:
Expand Down

0 comments on commit 779ced8

Please sign in to comment.