1.9.0 • Published 6 months ago
hexo-simple-minify v1.9.0
介绍
一个简单的 Hexo 压缩插件,基于 Lete114/hexo-minify。相比原项目,删除了图片压缩功能。
安装
# Use npm
npm install hexo-simple-minify --save
# Use pnpm
pnpm install hexo-simple-minify --save
# Use yarn
yarn add hexo-simple-minify
说明
如需修改,可在 Hexo 配置文件内编辑覆盖
如果仅安装插件,并未填写相关配置,则使用以下默认配置信息
## Hexo-minify Default Config Options
minify:
preview: false ## 本地预览时是否压缩
exclude: ['*.min.*']
js:
enable: true
sourceMap:
enable: false ## 生成 sourceMap
## 将 sourceMappingURL 插入压缩后的 js 文件,如果为 false 则需要在浏览器开发者工具中手动添加 sourceMap
sourceMappingURL: false ## //# sourceMappingURL=xxx.js.map
## 详细配置: https://github.com/terser/terser#minify-options
options: {}
css:
enable: true
## 详细配置: https://github.com/clean-css/clean-css#compatibility-modes
options: {}
html:
enable: true
## 详细配置: https://github.com/kangax/html-minifier#options-quick-reference
options:
minifyJS: true # Compressed JavaScript
minifyCSS: true # CSS Compressed
removeComments: true # Remove the comments
collapseWhitespace: true # Delete any extra space
removeAttributeQuotes: true # Delete attribute quotes
font:
enable: false
## 详细配置: https://github.com/Lete114/fontmin-spider#api
options: {}
1.9.0
6 months ago