Repository navigation
Add support for rel=preload - #951
Conversation
|
I cherry-picked the second commit into #952 and merged that. thanks! regarding the first commit, i don't fully understand the matter, but it seems there are other attributes besides preload that could be supported, see #690. if that's the case, it seems like your solution does not scale to multiple attributes because you'd need one OUTPUT_MODE per attribute combination, is that correct? |
|
Hi karyon,
With this additional output mode, django-compressor can now generate an My workflow with this version of django-compressor uses <head>
...
{% compress js preload %}
<script src="{% static 'website/js/index.min.js' %}"></script>
{% endcompress %}
...
</head>
<body>
...
{% compress js %}
<script src="{% static 'website/js/index.min.js' %}"></script>
{% endcompress %}
...
</body>Cheers! |
|
thanks! |
|
Any idea when this is going to be released? |
|
no, sorry. (fwiw, it's really really easy to put a specific commit of a git repository into your requirements.txt, try it! :D there's no additional testing or the like done on releases, so there's little downside for you.) |
|
I'm planning to do a release later this month. Please use the develop branch in the meantime. |
|
Nice, but it seems that it's not working when COMPRESS_ENABLED is False, then it juste leaves the js files ready to be executed :/ |
|
@VivienGiraud can you please open a new issue with the actual and expected behavior? |
Hi all,
This is a small change to simplify generating the
<link rel="preload">tag with the correct hash for a given css or js file.Tests and docs included.
Cheers!