-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
jQuery minify issue with new hugo v0.113.0+extended #11132
Comments
Do you any info about the last version of Hugo this was OK? |
Yes, this is a bug and needs to be fixed, but I think you would get a better JS setup if you rewrote the above to use
|
I just quickly tested this with that jQuery version and even minified it worked OK (I just ran some basic jquery examples found online) ... Which I guess it means that there's a certain part of jQuery that you use that somehow gets mingled. Which means that the upstream author probably needs some more info. |
I'm setting up a theme and will link the repo to this issue. |
This reverts commit 409c6c3. See gohugoio#11132
Not that it makes any difference in this case (it fails also starting with the unminified jQuery source), but doing minification on already minified JS sources is not something I would recommend. As to this issue, I'm reverting the upstream library to a working version for Hugo 0.114 (out soon). |
Disregard. |
While reducing this to a simple example, I found that the problem is exposed when the minified resource is rendered inline (see original code). For example, this fails: <script>{{ $js.Content | safeJS }}</script> This does not fail: <script src="{{ $js.RelPermalink }}"></script> This may be an encoding issue, perhaps related to tdewolff/minify@9fbf910 or tdewolff/minify@7d47c2c. Google Chrome and Firefox behave identically. Minimal example:
Open the browser's console, then:
|
I can confirm that was fixed with tdewolff/minify v2.12.7. Verified against @tfsojon's test repo, as well as the minimal example above. Tested with minified script inline and external. |
Thank You. Issue Solved with v0.114.0 |
v0.114.0 was a ... workaround. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
This issue with the latest release.
v0.113.0+extended
)without minify its working
The text was updated successfully, but these errors were encountered: