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
Compress script data block #34
Comments
Hi @willfarrell, even if we would add the Because in general this is not valid JavaScript but JSON and this library compresses HTML + JavaScript and CSS. But JSON is not JavaScript. |
Terser has an option to parse just an expression:
This may minify the JSON. |
Hi @mauriciabad, I'm not sure how we can add this in html-minifier-terser. PRs which add this are very welcome. |
Does it minify it? I'm not sure if this compresses every available form of JSON. Would be good if someone can test and verify this so we can discuss possible solutions. |
Pass an option like this works for me. |
For google datasets to work it requires Schema.org JSON-LD inline script tag on a page. Compression of this by default or behind a flag would be awesome.
Example
The text was updated successfully, but these errors were encountered: