1.0.3 • Published 5 years ago

wepy-plugin-compressor v1.0.3

Weekly downloads
4
License
ISC
Repository
github
Last release
5 years ago

Wepy-plugin-compressor

An easily-to-be-used compressor plugin for wepy 2.

Install

npm install wepy-plugin-compressor --save-dev

How to use

/* wepy.config.js */

// import the plugin
const WepyPluginCompressor = require('wepy-plugin-compressor');

// config to overwrite the default plugin settings
const options = { enabled: true };

// add the plugin
module.exports = {
  plugins: [
    WepyPluginCompressor(options),
  ],
};

Default settings

const options = {
  // by default the compression is disabled
  enabled: false,
  wxml: true,
  json: true,
  // by default the wxss compression is disabled
  wxss: false,
  // the engine under the hook is terser
  // which would automatically transpile the ES6 into ES5
  js: true,
};
1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago