
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
webpack-aliyun-oss
Advanced tools
A webpack plugin to upload assets to aliyun oss
一个webpack插件,上传资源到阿里云cdn
$ npm i webpack-aliyun-oss -S
from
: 从哪里取文件上传,默认为output.path。支持类似gulp.src的glob方法,如'./build/**', 可以为glob字符串或者数组。dist
: 上传到哪个目录下,默认为根目录。region
: 阿里云上传区域accessKeyId
: 阿里云的授权accessKeyIdaccessKeySecret
: 阿里云的授权accessKeySecretbucket
: 上传到哪个bucketdeletOrigin
: 上传完成是否删除原文件,默认falsesetHeaders
: 配置headersconst WebpackAliyunOss = require('webpack-aliyun-oss')
const webpackConfig = {
// ... 省略其他
plugins: [new WebpackAliyunOss({
from: ['./build/**', '!./build/**/*.html'],
dist: 'path/in/alioss',
region: 'your region',
accessKeyId: 'your key',
accessKeySecret: 'your secret',
bucket: 'your bucket',
deleteOrigin: false,
setHeaders(filePath) {
return {
'Cache-Control': 'max-age=31536000'
}
}
})]
}
FAQs
a webpack(version>=4) plugin to upload assets to aliyun oss, can be used with or without webpack.
The npm package webpack-aliyun-oss receives a total of 53 weekly downloads. As such, webpack-aliyun-oss popularity was classified as not popular.
We found that webpack-aliyun-oss demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.