Webpack 4 plugin that downloads remote files (e.g., analytics.js) during the build process and saves them locally with content hashes for cache busting. Version 1.1.0 is the latest stable release, offering a `hash` option to toggle content hashing. It integrates with `manifest-webpack-plugin` by emitting downloaded files. Designed for developers needing to self-host external scripts without manual downloads or build hooks.
npm install save-remote-file-webpack-pluginVerified import paths — ran on the pinned version, not inferred.
Shows how to require and configure the plugin in a webpack 4 config, downloading one remote file with content hashing enabled.
Update to version 1.0.1 or later: npm install save-remote-file-webpack-plugin@latest
Wrap single config in an array: new SaveRemoteFilePlugin([{ url: '...', filepath: '...' }])Use require('save-remote-file-webpack-plugin') directly, not { SaveRemoteFilePlugin }.Consider using webpack 5 compatible alternatives or migrate to fetch in build scripts.
Use const SaveRemoteFilePlugin = require('save-remote-file-webpack-plugin');Wrap option in array: new SaveRemoteFilePlugin([{ url: '...', filepath: '...' }])Install the 'download' package: npm install download