cos-uploader-plugins
v1.0.2
Published
```js const { defineConfig } = require('@vue/cli-service') const UploadPlugin = require('./uploadPlugin.js')
Downloads
2
Readme
使用说明
const { defineConfig } = require('@vue/cli-service')
const UploadPlugin = require('./uploadPlugin.js')
module.exports = defineConfig({
transpileDependencies: true,
configureWebpack: config => {
const options = {}
// 当环境为 production 环境时,才使用 UploadPlugin
if (config.mode === 'production') {
options.plugins = [
new UploadPlugin({
Bucket: 'BUCKET',
Region: 'Region',
SecretId: 'ID',
SecretKey: 'KEY'
})
]
}
return options
}
})