1.0.5 • Published 4 years ago

simple-cdn-webpack-plugin v1.0.5

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

simple-cdn-webpack-plugin

Upload the file to Qiniu cdn

Installation and usage

Install

npm install --save-dev simple-cdn-webpack-plugin

or

yarn add --dev simple-cdn-webpack-plugin

Example

const SimleCdnWebpackPlugin = required("simple-cdn-webpack-plugin");

new SimleCdnWebpackPlugin({
    accessKey: 'xxx',
    secretKey: 'xxx',
    zone: 'xxx',
    bucket: 'xxx',
    cdn: 'xxx',
    include: [/index\.html/],
    refresh: true,
    refreshFilters: [],
  })

Parameters

NameTypeDefaultDescription
accessKeystringqiniu accessKey, required
secretKeystringqiniu secretKey, required
zonestringqiniu zone, required
cdnstringqiniu cdn url, required
bucketstringqiniu bucket, required
excludearray[]exclude files that don't need to be uploaded, parameters can be strings, regular, functions
Includearray[]Include files that need to be uploaded, parameters can be strings, regular, functions
deleteboolfalsewhether to delete the last uploaded files from qiniu
Refreshbooltruewhether to refresh the file
refreshFiltersarray[]filter files that need to be refreshed, all files are refreshed by default. parameters can be strings, regular, functions
prefiexstringthe prefix of the filename

License

MIT License

Copyright (c) 2020 Abelce