@umu-team/webpack-bce-upload-plugin
umu baidu bce upload webpack plugin
Install
npm i -D @umu-team/webpack-bce-upload-plugin
Options
-
distFolder
file path -
cache
avoid duplicate uploading -
bucket
bucket to upload to -
endpoint
the domain to upload to -
ak
ak value -
sk
sk value -
exclude
RegExp to exclude files -
include
RegExp to include files
Usage
webpack config
webpack.config.js
const WebpackBceIploadPlugin = require('@umu-team/webpack-bce-upload-plugin')
module.exports = {
entry: 'index.js',
output: {
path: __dirname + '/dist',
filename: 'index_bundle.js'
},
plugins: [
new WebpackBceIploadPlugin({
endpoint: 'xxx'
bucket: 'static',
exclude: /\.DS_Store/
ak: 'xxx',
sk: 'xxx'
})
]
}