1.0.0 • Published 3 years ago

upload-static-resource-webpack-plugin v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

upload-static-resource-webpack-plugin

Webpack Plugin,又拍云CDN静态资源上传插件

###Installation npm:

npm install upload-static-resource-webpack-plugin upyun --save-dev

yarn:

yarn add upload-static-resource-webpack-plugin upyun

###Base Usage Add the plugin to your webpack config as follows:

// vue.config.js
const UploadStaticResourceWebpackPlugin = require('upload-static-resource-webpack-plugin');

module.exports = {
  configureWebpack: config => {
    config.plugins.push(new UploadStaticResourceWebpackPlugin({
      serverName: 'your serverName',
      opera: 'your opera',
      sign: 'your sign',
      basePath: 'your basePath',
      dir: path.resolve(__dirname, './'),
      fileType: []
    }))
  }
}

###Configuration The plugin allowed values are as follows:

  • serverName: 又拍云 - CDN服务名称
  • opera: 又拍云 - 操作人账号
  • sign: 又拍云 - 操作人sign
  • basePath: 又拍云 - CDN访问基础路径
  • dir: 当前项目静态资源目录
  • fileType: 文件上传白名单,默认'.png', '.gif', '.jpg', '.js', '.css', '.gz'
1.0.0

3 years ago