1.0.3 • Published 3 years ago

upload-resource-webpack-plugin v1.0.3

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

upload-resource-webpack-plugin

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

Installation

npm:

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

yarn:

yarn add upload-resource-webpack-plugin

Base Usage

Add the plugin to your webpack config as follows:

// Vue
// vue.config.js
const path = require('path');
const UploadResourceWebpackPlugin = require('upload-resource-webpack-plugin');

module.exports = {
  configureWebpack: config => {
    config.plugins.push(new UploadResourceWebpackPlugin({
      serverName: 'your serverName',
      opera: 'your opera',
      sign: 'your sign',
      basePath: 'your basePath',
      dir: path.resolve(__dirname, './dist'),
      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.2

3 years ago

1.0.3

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago