8000 GitHub - shuaibird/wepy-plugin-compressor: An easily-to-be-used compressor plugin for wepy 2.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

shuaibird/wepy-plugin-compressor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

Stars

Watchers

Forks

Packages

No packages published
0