Registry / devops / webpack-disk-plugin

webpack-disk-plugin

JSON →
library0.0.2jsnpmunverified

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.

npm install webpack-disk-plugin
INSTALL
IMPORT
SIG · WEBPACK-DISK-PLUGI
W
webpack-disk-plugin
devopsjavascriptv0.0.2
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
const DiskPlugin = require('webpack-disk-plugin');
No ESM export; only CommonJS available. No default import.

Copies a stats.json and a hashed main.js file to the build directory using webpack-disk-plugin.

const DiskPlugin = require('webpack-disk-plugin'); module.exports = { plugins: [ new DiskPlugin({ output: { path: 'build' }, files: [ { asset: 'stats.json' }, { asset: /[a-f0-9]{20}\.main\.js/, output: { filename: 'file.js' } } ] }) ] };
Debug
Known issues
deprecatedNo updates since 2016; likely incompatible with Webpack 4+ and 5.
fix
Consider alternative plugins like copy-webpack-plugin or webpack-manifest-plugin.
affects: >=4.0.0
gotchaOnly CommonJS require works; no ESM import.
fix
Use const DiskPlugin = require('webpack-disk-plugin');
affects: >=0.0.1
gotchaCannot have multiple files with the same output path; only one unique output path allowed.
fix
Ensure each file in the `files` array has a distinct output filename.
affects: >=0.0.1
Errors
Common errors & fixes
TypeError: DiskPlugin is not a constructor
Incorrect import for CommonJS.
fix
Use const DiskPlugin = require('webpack-disk-plugin'); without destructuring.
Module not found: Error: Can't resolve 'webpack-disk-plugin'
Package not installed.
fix
Run npm install webpack-disk-plugin --save-dev
Upgrade
Version history
0.0.2latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
9 hits · last 30 days
node
8
Resources
webpack-disk-plugin — npm install webpack-disk-plugin · libregistry