@bbtfe/webpack-offline-plugin
v0.0.4
Published
A Webpack Plugin for generating Offline Package for Babytree App
Downloads
12
Keywords
Readme
@bbtfe/webpack-offline-plugin
A Webpack Plugin for generating Offline Package for Babytree App.
Install
Using npm:
npm install @bbtfe/webpack-manifest-plugin --save-dev
Usage
Create a webpack.config.js
file:
const WebpackOfflinePlugin = require('@bbtfe/webpack-offline-plugin');
const options = {
descriptioFileName: 'offlineDescription.json', // 离线包描述文件名称,这个统一成一个即可,默认就是offlineDescription.json
pkgName: '', // 离线包名|项目名 这个需要与管理后台关联,为空则不执行打包
zipName: 'offline', // zip包名,这个统一成一个即可,为空则与pkgName一致
};
module.exports = {
// an example entry definition
entry: [ 'app.js' ],
...
plugins: [
new WebpackOfflinePlugin(options)
]
};