A lightweight and flexible minifier for JavaScript, CSS, and HTML with live file-watching support.
A lightweight and flexible minifier for JavaScript, CSS, and HTML with live file-watching support.
✅ Minifies JavaScript, CSS, and HTML efficiently
✅ Supports live watching for automatic minification
✅ Configurable options for each file type
✅ Lightweight and easy to use
Powered by:
Before installing minifix, make sure your environment meets the following requirements:
14+
(recommended 16+
)6.14+
(recommended 8+
)Before installing minifix, consider whether you need a local or global installation:
npm install --save-dev minifix
npm install --global minifix
npx minifix
minifix
📌 If minifix.config.mjs
does not exist, it will be created automatically.
minifix supports minification for:
.js
,.mjs
,.cjs
).html
,.htm
).css
)Edit the minifix.config.mjs
file to define input files, output files, and minification options.
_output_
appended to its name.📌 Refer to the official documentation for minifyOptions:
/* minifix.config.mjs */
export default {
inputs: ["views/input.html", "assets/css/input.css", "assets/js/input.js"],
outputs: ["views/index.html", "assets/css/style.css", "assets/js/default.js"],
minifyOptions: {
css: {
format: false
},
js: {
format: {
preamble: "/** Comment */"
}
},
html: {
collapseWhitespace: true,
removeComments: true,
removeRedundantAttributes: true
}
}
};
We appreciate any contributions!
If you encounter any issues, please open an issue in our GitHub repository:
➡️ GitHub Repository
➡️ Create a new issue
For feature requests or bug reports, follow these steps:
minifix is released under the MIT License.
If you have any questions, feel free to reach out: [email protected]