Closed mdesco-crgl closed 6 months ago
Using django-compressor in an HTML template
{% compress js file demo %} <script src="{% static 'demo/js/vendor/htmx/htmx.js' %}"></script> <!--version 1.9.2--> <script src="{% static 'demo/js/vendor/htmx/ext/preload.js' %}"></script> <script src="{% static 'demo/js/vendor/htmx/ext/morphdom-swap.js' %}"></script> <script src="{% static 'demo/js/vendor/hyperscript.js' %}"></script> <!--version 2.0.2--> {% endcompress %}
will cause Uncaught SyntaxError: Unexpected token < as GoogleTagManager renders HTML in the compressed .js file due to this error
Uncaught SyntaxError: Unexpected token <
Nevermind, the script I used to download the files from unpkg downloaded the pages from unpkg, not the raw files themselves
Using django-compressor in an HTML template
will cause
Uncaught SyntaxError: Unexpected token <
as GoogleTagManager renders HTML in the compressed .js file due to this error