Registry / devops / disable-output-webpack-plugin

disable-output-webpack-plugin

JSON →
library1.0.1jsnpmunverified

Webpack plugin that prevents saving output files to disk, useful for scenarios where you only need webpack's in-memory compilation (e.g., with webpack-dev-server or custom runners). Version 1.0.1 is current, no frequent releases. Simple no-config plugin, lighter than alternatives like `webpack-disk-plugin`. Likely no longer needed with webpack 5's `output.writeToDisk` option.

npm install disable-output-webpack-plugin
INSTALL
IMPORT
SIG · DISABLE-OUTPUT-WEB
D
disable-output-webpack-plugin
devopsjavascriptv1.0.1
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.

DisableOutputWebpackPlugin
const DisableOutputWebpackPlugin = require('disable-output-webpack-plugin')
import DisableOutputWebpackPlugin from 'disable-output-webpack-plugin'
Package does not export ES modules correctly; use CommonJS require.
default
const DisableOutputWebpackPlugin = require('disable-output-webpack-plugin')
const { DisableOutputWebpackPlugin } = require('disable-output-webpack-plugin')
The package exports a single constructor function, not a named export.
new
new DisableOutputWebpackPlugin()
new DisableOutputWebpackPlugin({})
The constructor takes no arguments; passing options will be ignored.

Basic setup to disable webpack output file writing. Note: output.path is still needed but files are not saved.

// webpack.config.js const DisableOutputWebpackPlugin = require('disable-output-webpack-plugin'); module.exports = { entry: './src/index.js', output: { path: '/dev/null', // still required but output won't be written filename: 'bundle.js' }, plugins: [ new DisableOutputWebpackPlugin() ] };
Debug
Known issues
gotchaThe plugin only works with webpack 4 and lower; webpack 5 has native support via `output.writeToDisk: false`.
fix
Use webpack 5's built-in `output.writeToDisk: false` instead.
affects: >=1.0.0
gotchaThe constructor accepts no options; passing any argument will be silently ignored.
fix
Remove any arguments from `new DisableOutputWebpackPlugin()`.
affects: >=1.0.0
gotchaIf using webpack-dev-server, output is already not written to disk by default, making this plugin redundant.
fix
Remove the plugin; webpack-dev-server handles in-memory compilation.
affects: >=1.0.0
Errors
Common errors & fixes
TypeError: DisableOutputWebpackPlugin is not a constructor
Using ES module import syntax (`import DisableOutputWebpackPlugin from ...`) which doesn't resolve to the CommonJS export correctly.
fix
Use `const DisableOutputWebpackPlugin = require('disable-output-webpack-plugin')` instead of `import`.
Module not found: Error: Can't resolve 'disable-output-webpack-plugin'
Package not installed or missing from node_modules.
fix
Run `npm install --save-dev disable-output-webpack-plugin`.
Error: You forgot to add 'mini-css-extract-plugin' plugin
Not related to this plugin; it's a common confusion with other plugins.
fix
Ensure other plugins like MiniCssExtractPlugin are properly configured if used.
Upgrade
Version history
1.0.1latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
disable-output-webpack-plugin — npm install disable-output-webpack-plugin · libregistry