-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
Cannot minify JavaScript file contains a bare Unicode escape identifier #9244
Comments
Just tried minification using esbuild using
If you want to use esbuild to handle minification, you need to set it on {{- $jsOpts := dict "minify" true -}}
{{- $js := resources.Get "js/script.js" | js.Build $jsOpts }}
<script src="{{ $js.Permalink }}"></script> Hugo Version:
|
Thanks for clarification. I will use esbuild to minify, and will open a new issue on tdewolff/minify. |
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. |
The following JavaScript source code seems odd, but it is completely legal. (See ECMA-262)
And, such a source code is generated by Scala.js.
When Hugo tries to minify a source containing a bare Unicode escape identifier, it shows the following error:
Noting that the latest ESBuild supports minifying source codes with a bare Unicode escape identifier, I think this problem is solved if ESBuild is updated.
What version of Hugo are you using (
hugo version
)?Does this issue reproduce with the latest release?
Yes
The text was updated successfully, but these errors were encountered: