Registry / devops / webpack-concat-plugin-with-optional-errors

webpack-concat-plugin-with-optional-errors

JSON →
library3.0.1jsnpmunverified

Webpack plugin for concatenating files into a single output, with optional error throwing control. Version 3.0.1 requires Webpack ^4.0.1. Forked from webpack-concat-plugin, it adds the ability to suppress or enable errors during the concatenation process, giving developers flexibility in handling missing sources. The plugin supports configuration of source paths, output file, and error behavior. Ideal for custom builds where file concatenation is needed without hard failures.

npm install webpack-concat-plugin-with-optional-errors
INSTALL
IMPORT
SIG · WEBPACK-CONCAT-PLU
W
webpack-concat-plugin-with-optional-errors
devopsjavascriptv3.0.1
Install
—
Import
—
Disk
—
Pass rate
0/ 6
Env Coverage0 / 6
glibc
18–22
musl
18–22
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 18–226 runs
build_error
glibc
node 18–226 runs
build_error
Code
Verified usage

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

default export
✓ import WebpackConcatPlugin from 'webpack-concat-plugin-with-optional-errors';
✗ const WebpackConcatPlugin = require('webpack-concat-plugin-with-optional-errors');
ESM default import; CJS require also works as the package provides a CommonJS export.
WebpackConcatPlugin (named)
✓ import { WebpackConcatPlugin } from 'webpack-concat-plugin-with-optional-errors';
Named export is also available; but most users use default import.

Shows basic usage with CJS require, concatenating two files and throwing on error.

const WebpackConcatPlugin = require('webpack-concat-plugin-with-optional-errors'); module.exports = { entry: './src/index.js', output: { path: __dirname + '/dist', filename: 'bundle.js' }, plugins: [ new WebpackConcatPlugin({ src: ['./src/header.js', './src/footer.js'], dest: 'concatenated.js', throwOnError: true }) ] };
Debug
Known issues
gotchaIf throwOnError is false, missing files will be silently ignored, potentially leading to unexpected output.
fix
Verify all source files exist or set throwOnError: true to get errors during build.
affects: all
breakingWebpack 5 is not supported; peer dependency requires webpack ^4.0.1.
fix
Use webpack 4 or look for an updated version compatible with webpack 5.
affects: >=3.0.0
Errors
Common errors & fixes
Module not found: Error: Can't resolve 'webpack-concat-plugin-with-optional-errors'
Package not installed or missing from node_modules.
fix
Run 'npm install webpack-concat-plugin-with-optional-errors --save-dev'
TypeError: WebpackConcatPlugin is not a constructor
Using wrong import style (e.g., destructured named export for default-only export).
fix
Use 'const WebpackConcatPlugin = require(...)' or 'import WebpackConcatPlugin from ...'
Upgrade
Version history
3.0.1latest on npm
Audit
Dependencies
webpackrequiredpeer dependency required for plugin functionality
Agent activity
11 hits · last 30 days
node
11
Resources
webpack-concat-plugin-with-optional-errors — npm install webpack-concat-plugin-with-optional-errors · libregistry