You can use a locally installed CLI tool to run the minification, and add it to your build pipeline (or Makefile or shell script or whatever ya got).
That said, it's convenient to be able to use npm to hook everything up, and obviously node has html-minifier readily available. I've used it in projects with virtually no JavaScript just for the build tooling, it disappears in the deployed bundle.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I definitely mean Python dev handwrite JavaScript in
<script>
tags or*.js
. I used to do that in the past, with jQuery as well. (And actually, there is one more concern -- Is it safe to use let or const in a <script> tag without a bundler?)I also used to handwrite
*.css
without minification as well.If you use Blade / Twig / Jinja / GoHtml, HTML-minification is the default. But if you use
*.html?
extension, how do you minify it without Node.js?What do you usually use, if you don't have Webpack / Parcel / Gulp / Grunt, etc.? Also, CSS, or do you use preprocessors?
You can use a locally installed CLI tool to run the minification, and add it to your build pipeline (or Makefile or shell script or whatever ya got).
That said, it's convenient to be able to use
npm
to hook everything up, and obviously node has html-minifier readily available. I've used it in projects with virtually no JavaScript just for the build tooling, it disappears in the deployed bundle.