Security News
New Proposed CISA Mandate Would Require Critical Infrastructure to Report Ransom Payments Within 24 Hours
CISA has proposed a set of new rules that would require critical infrastructure to report cyber incidents and ransom payments.
save-remote-file-webpack-plugin
Advanced tools
webpack 4 plugin to download & save remote files locally
Weekly downloads
Readme
yarn add save-remote-file-webpack-plugin --dev
or
npm install save-remote-file-webpack-plugin --save-dev
webpack 4 plugin to download & save remote files locally
It was written to allow for the downloading of https://google-analytics.com/analytics.js so that it can be served locally, but it can be used to locally download any remote file as part of the webpack build process.
The resulting file has a content hash appended to the file name after it is downloaded, and is added to your manifest.json
if you are using manifest-webpack-plugin
const SaveRemoteFilePlugin = require('save-remote-file-webpack-plugin');
module.exports = {
plugins: [
new SaveRemoteFilePlugin([
{
url: 'https://google-analytics.com/analytics.js',
filepath: 'js/analytics.js',
},
])
]
}
This would emit js/analytics.45eff9ff7d6c7c1e3c3d4184fdbbed90.js
and in your manifest.json
something like this:
"js/analytics.js": "/dist/js/analytics.45eff9ff7d6c7c1e3c3d4184fdbbed90.js"
You can pass in either an object, or an array of objects for downloading multiple files.
output.path
true
)FAQs
webpack 4 plugin to download & save remote files locally
The npm package save-remote-file-webpack-plugin receives a total of 1,898 weekly downloads. As such, save-remote-file-webpack-plugin popularity was classified as popular.
We found that save-remote-file-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
CISA has proposed a set of new rules that would require critical infrastructure to report cyber incidents and ransom payments.
Security News
Redis is no longer OSS, breaking its explicit commitment to remain under the BSD 3-Clause License forever. This has angered contributors who are now working to fork the software.
Product
Socket AI now enables 'AI detected potential malware' alerts by default, ensuring users benefit from AI-powered state-of-the-art malware detection without needing to opt-in.