Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
save-remote-file-webpack-plugin
Advanced tools
Changelog
1.1.0 - 2020-03-29
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,099 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.