chenzhutian / hexo-all-minifier

A plugin for Hexo that optimizes HTML, CSS, JS and imagages, and it can optionally deploys your blog.
MIT License
283 stars 30 forks source link

Cannot minify NexT local search script #48

Open wafer-li opened 6 years ago

wafer-li commented 6 years ago

Cannot minify NexT local search script.

But using the uglify-es in command line could minify it.

Here is the script: https://github.com/theme-next/hexo-theme-next/blob/master/layout/_third-party/search/localsearch.swig

And my package.json:

{
  "name": "hexo-site",
  "version": "0.0.0",
  "private": true,
  "hexo": {
    "version": "3.4.4"
  },
  "dependencies": {
    "hexo": "^3.4.4",
    "hexo-all-minifier": "^0.5.1",
    "hexo-deployer-git": "^0.3.1",
    "hexo-filter-plantuml": "^1.0.2",
    "hexo-generator-archive": "^0.1.5",
    "hexo-generator-atom-markdown-writer-meta": "^0.1.1",
    "hexo-generator-category": "^0.1.3",
    "hexo-generator-feed": "^1.2.0",
    "hexo-generator-index": "^0.2.0",
    "hexo-generator-searchdb": "^1.0.8",
    "hexo-generator-seo-friendly-sitemap": "0.0.21",
    "hexo-generator-tag": "^0.2.0",
    "hexo-renderer-ejs": "^0.3.1",
    "hexo-renderer-markdown-it-plus": "^1.0.2",
    "hexo-renderer-stylus": "^0.3.1",
    "hexo-server": "^0.3.1",
    "hexo-symbols-count-time": "^0.2.0",
    "markdown-it-criticmarkup": "0.0.1",
    "markdown-it-task-lists": "^2.1.0"
  }
}

And my minifiers config:

# Minifier
all_minifier: true

## HTML
html_minifier:
  enable: true
  ignore_error: false
  silent: false
  exclude:

## CSS
css_minifier:
  enable: true
  silent: false
  exclude:
    - '*.min.css'

## JS
js_minifier:
  enable: true
  mangle: true
  silent: false
  exclude:

# Image
image_minifier:
  enable: true
  interlaced: false
  multipass: false
  optimizationLevel: 2
  pngquant: false
  progressive: false
  silent: false

# JS Concator
js_concator:
  enable: true
  bundle_path: '/js/bundle.js'
  front: true
  silent: false
chenzhutian commented 6 years ago

Sorry for late reply. will be checked recently. I am currently busy working on my paper.

biaomingzhong commented 6 years ago

Same issue

njzjz commented 3 years ago

I think this issue has already been solved by #105.