We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
for example:
const minified = minify(html, { collapseWhitespace: true, conservativeCollapse: true, keepClosingSlash: true, minifyCSS: true, minifyJS: true, minifyURLs: true, removeScriptTypeAttributes: true, removeStyleLinkTypeAttributes:true, removeComments: true });
<html> <form action="http://localhost:3000/update" method="post"> <label for="email">Email</label><br> <input type="email" id="email" name="email"><br><br> <label for="firstName">First name</label><br> <input type="text" id="firstName" name="firstName"><br><br> <label for="lastName">Last name</label><br> <input type="text" id="lastName" name="lastName"><br><br> <label for="birthDate">Birth date</label><br> <input type="date" id="birthDate" name="birthDate"><br><br> <label for="id">IC number</label><br> <input type="text" id="icNumber" name="icNumber"><br><br> <button type="submit">Save</button> </form> <script> fetch('/api/user/{{userId}}') .then(response => response.json()) .then(data => { const bod = new Date(data.birthDate).toJSON().slice(0, 10) document.getElementById("email").value = data.email; document.getElementById("firstName").value = data.firstName document.getElementById("lastName").value = data.lastName document.getElementById("birthDate").value = bod document.getElementById("icNumber").value = data.icNumber }) </script> </html>
The text was updated successfully, but these errors were encountered:
It's because uglify-js (used for minifying the JS code) does not support this (ES6).
You might want to try https://github.com/terser/html-minifier-terser
Sorry, something went wrong.
Thank you @DanielRuf
No branches or pull requests
for example:
The text was updated successfully, but these errors were encountered: