{"library":"save-remote-file-webpack-plugin","title":"save-remote-file-webpack-plugin","description":"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.","language":"javascript","status":"maintenance","last_verified":"Sat Apr 25","install":{"commands":["npm install save-remote-file-webpack-plugin"],"cli":null},"imports":["const SaveRemoteFilePlugin = require('save-remote-file-webpack-plugin');","const { default: SaveRemoteFilePlugin } = require('save-remote-file-webpack-plugin');","new SaveRemoteFilePlugin([{ url: '...', filepath: '...' }])"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"const SaveRemoteFilePlugin = require('save-remote-file-webpack-plugin');\n\nmodule.exports = {\n  entry: './src/index.js',\n  output: {\n    path: path.resolve(__dirname, 'dist'),\n    filename: 'bundle.js',\n  },\n  plugins: [\n    new SaveRemoteFilePlugin([\n      {\n        url: 'https://example.com/external.js',\n        filepath: 'js/external.js',\n        hash: true,\n      },\n    ]),\n  ],\n};","lang":"javascript","description":"Shows how to require and configure the plugin in a webpack 4 config, downloading one remote file with content hashing enabled.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}