wepy-plugin-compressor

1.0.3 • Public • Published

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,
};

Package Sidebar

Install

npm i wepy-plugin-compressor

Weekly Downloads

0

Version

1.0.3

License

ISC

Unpacked Size

2.9 kB

Total Files

3

Last publish

Collaborators

  • shuaibird