html-minifier icon indicating copy to clipboard operation
html-minifier copied to clipboard

Any plans to minify content within script tag of type="application/ld+json"?

Open VincentVToscano opened this issue 3 years ago • 1 comments

Sending a big thanks to the team and contributors maintaining this project 👍

I wanted to ask if there were any plans to minify content within <script type="application/ld+json">? Below are all the details of my system and how I've implemented your hard work within my projects. Within that script tag, I am using an array. Hoping this helps. Thanks for reviewing and please let me know if I can give any more details that help.

Version "html-minifier": "^4.0.0",

System macOS 12.4

Node v14.16.1

Usage html-minifier --input-dir ../public/ --output-dir ../public/ --case-sensitive --collapse-whitespace --remove-comments --remove-redundant-attributes --remove-script-type-attributes --minify-css true --minify-js true --file-ext html

VincentVToscano avatar Jul 20 '22 02:07 VincentVToscano

That should work out of the box. Can only share how it’s handled in HTML Minifier Next (enhanced successor), but see this example in the web version.

(I took this to improve documentation and extend use cases on the HMN side.)

j9t avatar Dec 18 '25 13:12 j9t