![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
aliyunoss-webpack-plugin
Advanced tools
when build ,it can auto update static resources to aliyun oss
##aliyunoss-webpack-plugin webpack的插件,用于自动上传静态资源到阿里的oss上,以便作为静态资源使用,当然你也可以用于自动存储大文件。
Install the plugin with npm:
$ npm install aliyunoss-webpack-plugin --save-dev
add the plugin to your webpack config as follows:
var AliyunossWebpackPlugin = require('aliyunoss-webpack-plugin')
var webpackConfig = {
entry: 'index.js',
output: {
path: 'dist',
filename: 'index_bundle.js'
},
plugins: [new AliyunossWebpackPlugin({
buildPath:'your build path',
region: 'your region',
accessKeyId: 'your key',
accessKeySecret: 'your secret',
bucket: 'your bucket',
getObjectHeaders: function(filename) {
return {
Expires: 6000
}
}
})]
}
don't depend webpack,just as follows:
var AliyunossWebpackPlugin = require('aliyunoss-webpack-plugin')
var oss = new AliyunossWebpackPlugin({
buildPath:'your build path',
region: 'your region',
accessKeyId: 'your key',
accessKeySecret: 'your secret',
bucket: 'your bucket',
deleteAll: true,
generateObjectPath: function(filename) {
return filename
},
getObjectHeaders: function(filename) {
return {
Expires: 6000
}
}
});
oss.apply()
The plugin allowed values are as follows:
buildPath
: 需要上传的文件路径,支持整个文件夹的遍历。支持node-glob风格路径,具体可以参见node-glob的文档。region
: oss的区域,如:oss-cn-shanghai。accessKeyId
: 阿里云的权限访问的key。accessKeySecret
: 阿里云的权限访问的secret。bucket
: 阿里云OSS上的命名空间。deleteAll
: 先删除oss上的代码之后再上传,默认为falsegenerateObjectPath
: 函数(可选),函数参数为上传的文件名,必须返回一个字符串作为文件名,默认为文件原名。通过该函数可以让使用者自定义上传的文件名或者修改oss的路径,比如加一个前缀等getObjectHeaders
: 函数(可选),函数参数为上传的文件名,返回设置的headers对象,默认为空,具体可以参见ali-oss的文档internal
: 使用内网还是外网(可选),默认外网FAQs
when build ,it can auto update static resources to aliyun oss
The npm package aliyunoss-webpack-plugin receives a total of 6 weekly downloads. As such, aliyunoss-webpack-plugin popularity was classified as not popular.
We found that aliyunoss-webpack-plugin 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
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.