wepy 插件 压缩

npm install wepy-plugin-filemin --save-dev
module.exports.plugins = {
  'filemin': {
    filter: /\.(json|wxml|xml)$/
  }
};


npm install wepy-compiler-less --save-dev
module.exports = {
  "compilers": {
    less: {
      "compress": true
    }
  }
};

npm install wepy-plugin-uglifyjs --save-dev

module.exports.plugins = {
  'uglifyjs': {
    filter: /\.js$/,
    config: {
    }
  },
};



npm install wepy-plugin-imagemin --save-dev

module.exports.plugins = {
  'imagemin': {
    filter: /\.(jpg|png|jpeg)$/,
    config: {
      'jpg': {
        quality: 80
      },
      'png': {
        quality: 80
      }
    }
  }
};

标签: none

添加新评论