You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

vue-cli-plugin-ali-oss

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-cli-plugin-ali-oss

upload ali oss for webpack or vue

1.0.0
Source
npmnpm
Version published
Weekly downloads
4
-69.23%
Maintainers
1
Weekly downloads
 
Created
Source

简介

实现阿里云oss打包后自动上传

使用说明

配置

1.创建 oss.js(优先级最高)

路径: {你的项目目录下}/oss.js

oss.js:

module.exports = {
	accessKeyId: "xxx",
	accessKeySecret: "xxx",
	bucket: "bucket",
	prefix: "prefix",
	projectName: true,
};

2.或者在插件初始化写入配置(优先级中)

new tinypngPlugin({
    accessKeyId: "xxx",
	accessKeySecret: "xxx",
	bucket: "bucket",
	prefix: "prefix",
	projectName: true,
})

引入

configureWebpack: (config) => {
    return {
        plugins: [
            new aliOssPlugin()
        ]
    }
}

配置属性

accessKeyId

阿里云accessKeyId

accessKeyId:XXX,

accessKeySecret

阿里云accessKeySecret

accessKeySecret:XXX,

bucket

bucket名称

bucket:XXX,

timeout

超时时间 默认:15 * 1000

timeout:XXX,

secure

是否https 默认:true

secure:XXX,

region

阿里oss-region 默认:"oss-cn-hangzhou"

region:XXX,

prefix

路径前缀名称

prefix:XXX,

projectName

是否使用项目名称在路径中 默认:true

projectName:XXX,

use

是否使用该插件 default: true

use: true/false,

reg

可识别的正则 默认: /.(png|jpe?g|bmp|gif|mp4|webm)/i

reg: XXXX

其他示例

vue-cli自动解析静态资源

Keywords

vue

FAQs

Package last updated on 03 Jan 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts