Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mikasayw/wepy-plugin-minify
mini code plugin for Wepy
https://github.com/mikasayw/wepy-plugin-minify
wepy wepy2
Last synced: about 2 months ago
JSON representation
mini code plugin for Wepy
- Host: GitHub
- URL: https://github.com/mikasayw/wepy-plugin-minify
- Owner: mikasayw
- Created: 2022-04-18T09:50:53.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-04-19T02:06:29.000Z (over 2 years ago)
- Last Synced: 2024-04-24T23:41:56.521Z (9 months ago)
- Topics: wepy, wepy2
- Language: JavaScript
- Homepage:
- Size: 6.84 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.MD
Awesome Lists containing this project
README
# @wepy/plugin-minify 插件
## 安装
```bash
npm install wepy-plugin-minify --save-dev
```## 配置`wepy.config.js`
```javascript
const WepyPluginMinify = require('wepy-plugin-minify');module.exports = {
plugins: [
// 不传 options默认开启
WepyMinifyPlugin({ enable: true })
],
};
```## 参数说明
你提供的配置选项 ```options``` 的 enable 字段 用于配置否关闭压缩功能。默认为开启
内部默认配置如下:
```javascript
const options = {
enabled: true,
wxml: true,
wxss: false,
js: true,
json: true,
compress: {
drop_console: true,
drop_debugger: true
},
};
```