Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using Compressor causes Script Syntax Error #2463

Closed
mdesco-crgl opened this issue Apr 4, 2024 · 1 comment
Closed

Using Compressor causes Script Syntax Error #2463

mdesco-crgl opened this issue Apr 4, 2024 · 1 comment

Comments

@mdesco-crgl
Copy link

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

@mdesco-crgl
Copy link
Author

Nevermind, the script I used to download the files from unpkg downloaded the pages from unpkg, not the raw files themselves

@mdesco-crgl mdesco-crgl closed this as not planned Won't fix, can't repro, duplicate, stale Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant