aliyun-oss-loader
v0.1.6
Published
aliyun oss loader for webpack
Downloads
3
Readme
aliyun-oss-loader
a webpack loader for uploading files to aliyun oss
usage
npm install aliyun-oss-loader --save-dev
set config in your webpack file
module: {
loaders: [
{
test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
loader: 'aliyun-oss-loader',
options: {
region: 'xxxxxxxxx',
bucket: 'xxxxxx',
accessKeyId: 'xxxxx',
accessKeySecret: 'xxxx',
name: 'folder/[name].[hash].[ext]',
https: true,
domain: 'img.xxx.com'
}
}
]
}
params
region
String
Required
bucket
String
Required
accessKeyId
String
Required
accessKeySecret
String
Required
name
String
Optional default '[name].[hash].[ext]'
https
Boolean
Optional default false
domain
String
Optional support customize domain name