{"id":20728,"library":"webpack-concat-plugin-with-optional-errors","title":"webpack-concat-plugin-with-optional-errors","description":"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.","status":"active","version":"3.0.1","language":"javascript","source_language":"en","source_url":"https://github.com/marksy/webpack-concat-plugin","tags":["javascript"],"install":[{"cmd":"npm install webpack-concat-plugin-with-optional-errors","lang":"bash","label":"npm"},{"cmd":"yarn add webpack-concat-plugin-with-optional-errors","lang":"bash","label":"yarn"},{"cmd":"pnpm add webpack-concat-plugin-with-optional-errors","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency required for plugin functionality","package":"webpack","optional":false}],"imports":[{"note":"ESM default import; CJS require also works as the package provides a CommonJS export.","wrong":"const WebpackConcatPlugin = require('webpack-concat-plugin-with-optional-errors');","symbol":"default export","correct":"import WebpackConcatPlugin from 'webpack-concat-plugin-with-optional-errors';"},{"note":"Named export is also available; but most users use default import.","wrong":null,"symbol":"WebpackConcatPlugin (named)","correct":"import { WebpackConcatPlugin } from 'webpack-concat-plugin-with-optional-errors';"}],"quickstart":{"code":"const WebpackConcatPlugin = require('webpack-concat-plugin-with-optional-errors');\n\nmodule.exports = {\n  entry: './src/index.js',\n  output: {\n    path: __dirname + '/dist',\n    filename: 'bundle.js'\n  },\n  plugins: [\n    new WebpackConcatPlugin({\n      src: ['./src/header.js', './src/footer.js'],\n      dest: 'concatenated.js',\n      throwOnError: true\n    })\n  ]\n};","lang":"javascript","description":"Shows basic usage with CJS require, concatenating two files and throwing on error."},"warnings":[{"fix":"Verify all source files exist or set throwOnError: true to get errors during build.","message":"If throwOnError is false, missing files will be silently ignored, potentially leading to unexpected output.","severity":"gotcha","affected_versions":"all"},{"fix":"Use webpack 4 or look for an updated version compatible with webpack 5.","message":"Webpack 5 is not supported; peer dependency requires webpack ^4.0.1.","severity":"breaking","affected_versions":">=3.0.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Run 'npm install webpack-concat-plugin-with-optional-errors --save-dev'","cause":"Package not installed or missing from node_modules.","error":"Module not found: Error: Can't resolve 'webpack-concat-plugin-with-optional-errors'"},{"fix":"Use 'const WebpackConcatPlugin = require(...)' or 'import WebpackConcatPlugin from ...'","cause":"Using wrong import style (e.g., destructured named export for default-only export).","error":"TypeError: WebpackConcatPlugin is not a constructor"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}