阿里云 OSS 上传工具 Webpack 插件
yarn add oss-db-webpack-plugin -D
npm install oss-db-webpack-plugin -D
const path = require('path')
// ES
import OSSWebpackPlugin from 'oss-db-webpack-plugin'
// JS
const OSSWebpackPlugin = require('oss-db-webpack-plugin').default
module.exports = {
output: {
path: path.join(__dirname, './dist'),
publicPath: '/oss-db-webpack-plugin'
},
plugins: [new OSSWebpackPlugin()]
}
Type: string
Default: output.publicPath
基础路径,默认为 webpack 配置中的 output.publicPath
Type: string
Default: duiba
OSS 实例
Type: number
Default: 10
最大上传并发数
Type: function
Default: -
上传完成回调函数