1.0.0 • Published 2 years ago

qiniu-s-webpack-plugin v1.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

qiniu-s-webpack-plugin

将打包好的静态资源上传至七牛

安装

npm install -D qiniu-s-webpack-plugin

or 

yarn add -D qiniu-s-webpack-plugin

使用

const QiniuWebpackPlugin = require('qiniu-s-webpack-plugin');

module.exports = {
  entry: 'index.js',
  output: {
    path: path.resolve(__dirname, './dist'),
    filename: 'index_bundle.js',
  },
  plugins: [
    new QiniuWebpackPlugin({
      ...
    })
  ],
};

Options

NameTypeDefaultRequiredDescription
accessKeystring''true七牛 Access Key
secretKeystring''true七牛 Secret Key
bucketstring''true七牛 空间名
forceDeletebooleanfalsefalse上传文件前,先强制删除之前上传七牛云上的文件