Questions tagged [html-minifier]

11 questions
2
votes
0 answers

Html minifier in client side

How can I minify an html string on client side with html minifier ? I already take a look to html-minifier it work well on node.js but i don't know if it's possible to use it in browser environnement. Anyone can provide a working example ?
ZecKa
  • 2,552
  • 2
  • 21
  • 39
1
vote
0 answers

How To prevent HTML-Minifier to minify page source code to one line in Nuxt 3

I'm working on a project with Wagtail CMS (headless) as backend and Nuxt 3 as frontend. Steps to reproduce: Right click on the page (local development and/or live), and click on "View Page Source". The content of the whole tag is on one line. I…
1
vote
2 answers

Why the minify function returns Promise { } instead of the HTML when I require a global html-minifier?

I don't want to install the node modules again and again so I found a post here. It uses npm link to let me require global packages. However, when I use the method, the html-minifier-terser is not working properly. The minify function returns…
AGamePlayer
  • 7,404
  • 19
  • 62
  • 119
0
votes
0 answers

How to minify HTML code in one line Nuxt3?

I'm wondering is it possible to minify the page source code to one line in Nuxt3? I use the package "@nuxtjs/html-minifier" but i can't setup. I want the page of source code to be in a one line.
konsav
  • 1
0
votes
1 answer

How to mangle function names used in event attributes with html-minifier-terser?

I am using the latest https://github.com/terser/html-minifier-terser 7.0.0 (https://www.npmjs.com/package/html-minifier-terser) The readme states Minify JavaScript in script elements and event attributes (uses Terser) I am trying the following…
handle
  • 5,859
  • 3
  • 54
  • 82
0
votes
0 answers

Is it possible to tell html-minifier-terser to remove customized lines?

I have an some HTML like this: