Security News
The Push to Ban Ransom Payments Is Gaining Momentum
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
webpack-nexus-upload-plugin
Advanced tools
Readme
webpack plugin for detail the files of webpack compiled with your own way, such as OSS, S3 etc.
use this plugin, the webpack compiled files are processed again. Upload to OSS, S3, or local disk,the default is built-in alioss.
$ npm install --save webpack-nexus-upload-plugin
Add new plugin instance to your webpack
config
const SourceUploaderWebpackPlugin = require('source-uploader-webpack-plugin');
const compiler = webpack({
output: {
publicPath: "your cdn path"
},
// ...
plugins: [
new SourceUploaderWebpackPlugin({
path: paths.appBuild,
aliOSS: {
region: '<Your region>',
accessKeyId: '<Your AccessKeyId>',
accessKeySecret: '<Your AccessKeySecret>',
bucket: 'Your bucket name',
fileDir: 'file path on alioss'
},
upload: function(filename, source) {
// dosomthing with file source
console.log(source)
}
)
]
})
The plugin accepts the following options:
path
: Your application build path(output->path), for generate the local html file.
aliOSS
: aliOSS options.
region: ''
accessKeyId: ''
accessKeySecret: ''
bucket: 'Your bucket name'
fileDir: 'file path on alioss'
upload
: Your own callback function, accept two parameters:
@param filename: include the build path, for example static/js/main.js
@param source: the file source
@return true/false, true is upload success, on the contrary is upload failed
aliOSS
, also you can use upload
callback, in the callback function, you can write you own code implementation.publicPath
in webpack should be your cdn path, the compiled file will be replaced with this path.MIT
FAQs
upload webpack compiled file with your own way, such as OSS, S3 etc.
We found that webpack-nexus-upload-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
Ransomware costs victims an estimated $30 billion per year and has gotten so out of control that global support for banning payments is gaining momentum.
Application Security
New SEC disclosure rules aim to enforce timely cyber incident reporting, but fear of job loss and inadequate resources lead to significant underreporting.
Security News
The Python Software Foundation has secured a 5-year sponsorship from Fastly that supports PSF's activities and events, most notably the security and reliability of the Python Package Index (PyPI).