{"id":20748,"library":"webpack-disk-plugin","title":"webpack-disk-plugin","description":"A Webpack plugin (v0.0.2) that writes specified compiler assets to disk, useful with webpack-dev-server where files are memory-only. It hooks into the after-emit event and supports regex or string asset matching, custom filenames (string or function), and nested output paths. Not updated since 2016; likely unmaintained.","status":"abandoned","version":"0.0.2","language":"javascript","source_language":"en","source_url":"https://github.com/FormidableLabs/webpack-disk-plugin","tags":["javascript","webpack"],"install":[{"cmd":"npm install webpack-disk-plugin","lang":"bash","label":"npm"},{"cmd":"yarn add webpack-disk-plugin","lang":"bash","label":"yarn"},{"cmd":"pnpm add webpack-disk-plugin","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"No ESM export; only CommonJS available. No default import.","symbol":"default","correct":"const DiskPlugin = require('webpack-disk-plugin');"}],"quickstart":{"code":"const DiskPlugin = require('webpack-disk-plugin');\n\nmodule.exports = {\n  plugins: [\n    new DiskPlugin({\n      output: { path: 'build' },\n      files: [\n        { asset: 'stats.json' },\n        { asset: /[a-f0-9]{20}\\.main\\.js/, output: { filename: 'file.js' } }\n      ]\n    })\n  ]\n};","lang":"javascript","description":"Copies a stats.json and a hashed main.js file to the build directory using webpack-disk-plugin."},"warnings":[{"fix":"Consider alternative plugins like copy-webpack-plugin or webpack-manifest-plugin.","message":"No updates since 2016; likely incompatible with Webpack 4+ and 5.","severity":"deprecated","affected_versions":">=4.0.0"},{"fix":"Use const DiskPlugin = require('webpack-disk-plugin');","message":"Only CommonJS require works; no ESM import.","severity":"gotcha","affected_versions":">=0.0.1"},{"fix":"Ensure each file in the `files` array has a distinct output filename.","message":"Cannot have multiple files with the same output path; only one unique output path allowed.","severity":"gotcha","affected_versions":">=0.0.1"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Use const DiskPlugin = require('webpack-disk-plugin'); without destructuring.","cause":"Incorrect import for CommonJS.","error":"TypeError: DiskPlugin is not a constructor"},{"fix":"Run npm install webpack-disk-plugin --save-dev","cause":"Package not installed.","error":"Module not found: Error: Can't resolve 'webpack-disk-plugin'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}