Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
save-remote-file-webpack-plugin
Advanced tools
webpack 4 plugin to download & save remote files locally
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
)1.1.0 - 2020-03-29
FAQs
webpack 4 plugin to download & save remote files locally
The npm package save-remote-file-webpack-plugin receives a total of 0 weekly downloads. As such, save-remote-file-webpack-plugin popularity was classified as not 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
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.