feat: add .webmanifest as json, add .map and .wasm to compressing

This commit is contained in:
wherewhere 2024-12-03 16:41:52 +08:00
parent ac31b9edaa
commit bcaa327494
2 changed files with 14 additions and 3 deletions

View File

@ -177,7 +177,9 @@ minify:
enable: false enable: false
include: include:
- "*.json" - "*.json"
- "*.webmanifest"
- "!*.min.json" - "!*.min.json"
- "!*.min.webmanifest"
``` ```
- **enable** - Enable the plugin. Defaults to `false`. - **enable** - Enable the plugin. Defaults to `false`.
@ -197,6 +199,8 @@ minify:
- "*.html" - "*.html"
- "*.css" - "*.css"
- "*.js" - "*.js"
- "*.map"
- "*.wasm"
- "*.txt" - "*.txt"
- "*.ttf" - "*.ttf"
- "*.atom" - "*.atom"
@ -205,6 +209,7 @@ minify:
- "*.svg" - "*.svg"
- "*.eot" - "*.eot"
- "*.json" - "*.json"
- "*.webmanifest"
``` ```
- **enable** - Enable the plugin. Defaults to `true`. - **enable** - Enable the plugin. Defaults to `true`.
@ -226,6 +231,8 @@ minify:
- "*.html" - "*.html"
- "*.css" - "*.css"
- "*.js" - "*.js"
- "*.map"
- "*.wasm"
- "*.txt" - "*.txt"
- "*.ttf" - "*.ttf"
- "*.atom" - "*.atom"
@ -234,6 +241,7 @@ minify:
- "*.svg" - "*.svg"
- "*.eot" - "*.eot"
- "*.json" - "*.json"
- "*.webmanifest"
``` ```
- **enable** - Enable the plugin. Defaults to `true`. - **enable** - Enable the plugin. Defaults to `true`.
@ -253,6 +261,8 @@ minify:
- "*.html" - "*.html"
- "*.css" - "*.css"
- "*.js" - "*.js"
- "*.map"
- "*.wasm"
- "*.txt" - "*.txt"
- "*.ttf" - "*.ttf"
- "*.atom" - "*.atom"
@ -261,6 +271,7 @@ minify:
- "*.svg" - "*.svg"
- "*.eot" - "*.eot"
- "*.json" - "*.json"
- "*.webmanifest"
``` ```
- **enable** - Enable the plugin. Defaults to `false`. - **enable** - Enable the plugin. Defaults to `false`.

View File

@ -81,7 +81,7 @@ hexo.config.minify.gzip = {
enable: true, enable: true,
priority: 10, priority: 10,
verbose: false, verbose: false,
include: ['*.html', '*.css', '*.js', '*.txt', '*.ttf', '*.atom', '*.stl', '*.xml', '*.svg', '*.eot', '*.json', '*.webmanifest'], include: ['*.html', '*.css', '*.js', '*.map', '*.wasm', '*.txt', '*.ttf', '*.atom', '*.stl', '*.xml', '*.svg', '*.eot', '*.json', '*.webmanifest'],
globOptions: { basename: true }, globOptions: { basename: true },
...hexo.config.minify.gzip ...hexo.config.minify.gzip
} }
@ -90,7 +90,7 @@ hexo.config.minify.brotli = {
enable: true, enable: true,
priority: 10, priority: 10,
verbose: false, verbose: false,
include: ['*.html', '*.css', '*.js', '*.txt', '*.ttf', '*.atom', '*.stl', '*.xml', '*.svg', '*.eot', '*.json', '*.webmanifest'], include: ['*.html', '*.css', '*.js', '*.map', '*.wasm', '*.txt', '*.ttf', '*.atom', '*.stl', '*.xml', '*.svg', '*.eot', '*.json', '*.webmanifest'],
globOptions: { basename: true }, globOptions: { basename: true },
...hexo.config.minify.brotli ...hexo.config.minify.brotli
} }
@ -99,7 +99,7 @@ hexo.config.minify.zstd = {
enable: false, enable: false,
priority: 10, priority: 10,
verbose: false, verbose: false,
include: ['*.html', '*.css', '*.js', '*.txt', '*.ttf', '*.atom', '*.stl', '*.xml', '*.svg', '*.eot', '*.json', '*.webmanifest'], include: ['*.html', '*.css', '*.js', '*.map', '*.wasm', '*.txt', '*.ttf', '*.atom', '*.stl', '*.xml', '*.svg', '*.eot', '*.json', '*.webmanifest'],
globOptions: { basename: true }, globOptions: { basename: true },
...hexo.config.minify.zstd ...hexo.config.minify.zstd
} }