0.5.1 • Published 4 years ago

upload-file-webpack-plugin v0.5.1

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

upload-file-webpack-plugin

A Webpack plugin to upload file to server.

Install

npm i --save upload-file-webpack-plugin

Usage

const path = require('path');
const UploadFileWebpackPlugin = require('upload-file-webpack-plugin');

new UploadFileWebpackPlugin({
  url: 'https://myapi.com',
  filePath: path.join(__dirname, 'dist'),
})

Options

参数说明类型
url上传文件的服务器地址string
methodrequest 请求方法Method
filePath要上传文件的路径string
fileTypes要上传文件的类型(string/regex)[]
onSuccess上传成功后的回调function
onError上传失败后的回调function
0.5.1

4 years ago

0.5.0

4 years ago

0.4.0

4 years ago

0.3.6

4 years ago

0.3.5

4 years ago

0.3.4

4 years ago

0.3.3

4 years ago

0.3.2

4 years ago

0.3.1

4 years ago

0.3.0

4 years ago

0.2.0

4 years ago

0.1.0

4 years ago