Skip to content

tcly861204/qiniu-upload-webpack-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

upload-qiniu-cloud

GitHub

将 webpack 打包出来的静态文件上传到七牛云。

特点

  • 上传webpack打包后的所有静态资源到七牛云
  • 自动忽略.html, .html.br, .html.gz文件
  • 支持覆盖已上传文件

基于官方七牛云Node.js SDK

安装

npm i upload-qiniu-cloud -D

使用方法

const QiniuUploadWebpackPlugin = require('upload-qiniu-cloud')
plugins: [
  new QiniuUploadWebpackPlugin({
    publicPath: 'http://xxx.com', // 七牛云域名,自动替换 publicPath
    accessKey: 'accessKey', // 个人中心,秘钥管理,AK
    secretKey: 'secretKey', // 个人中心,秘钥管理,SK
    bucket: 'xxx', // 存储空间名称
    zone: 'Zone_z0' // 空间对应的机房,zone_z1代表华北,其他配置参见七牛云文档
  })
];

效果截图

示例

About

🎉🎉🔥webpack打包完以后静态资源打包上传到qiniu插件

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published