canirequire

canirequireCommonJS › friendly-errors-webpack-plugin

Is friendly-errors-webpack-plugin ESM-only? Can you require() it?

Recognizes certain classes of webpack errors and cleans, aggregates and prioritizes them to provide a better Developer Experience

Last verified Sep 9, 2026 against friendly-errors-webpack-plugin@1.7.0. JSON

CommonJS CommonJS — require() works on every Node.js version

friendly-errors-webpack-plugin ships CommonJS only. require("friendly-errors-webpack-plugin") works everywhere. import "friendly-errors-webpack-plugin" also works because Node.js and Bun can import CommonJS from ES modules, but only the default export is guaranteed; named imports depend on Node's static analysis of the module.

Latest
1.7.0 (Apr 5, 2018)
Module format
CommonJS
Last CommonJS version
1.7.0
TypeScript types
@types/friendly-errors-webpack-plugin
Node engines
not declared
Weekly downloads
204K
License
MIT

Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

Does friendly-errors-webpack-plugin@1.7.0 actually load? Runtime test results

Installed and executed on Sep 9, 2026 with require("friendly-errors-webpack-plugin") from a CommonJS file and import "friendly-errors-webpack-plugin" from an ES module.

Runtimerequire("friendly-errors-webpack-plugin")import "friendly-errors-webpack-plugin"
Node.js 18✓ works✓ works
Node.js 20✓ works✓ works
Node.js 22✓ works✓ works
Node.js 24✓ works✓ works
Node.js 26✓ works✓ works
Bun 1.4✓ works✓ works

How to import friendly-errors-webpack-plugin

ES modules (import)

import friendlyErrorsWebpackPlugin from "friendly-errors-webpack-plugin";

Named imports from a CommonJS package only work when Node.js can statically detect them. If a named import fails, use the default import and destructure.

CommonJS (require)

const friendlyErrorsWebpackPlugin = require("friendly-errors-webpack-plugin");

Module format by version

Derived from the type, main and exports fields of every stable release on npm (16 versions; the newest 16 shown).

VersionsFormatFirst published
1.0.0 – 1.7.0CommonJSAug 26, 2016

Frequently asked

Is friendly-errors-webpack-plugin ESM-only?

friendly-errors-webpack-plugin@1.7.0 is a CommonJS package. friendly-errors-webpack-plugin ships CommonJS only. require("friendly-errors-webpack-plugin") works everywhere. import "friendly-errors-webpack-plugin" also works because Node.js and Bun can import CommonJS from ES modules, but only the default export is guaranteed; named imports depend on Node's static analysis of the module.

Can I import friendly-errors-webpack-plugin with ES module syntax?

Yes. import friendlyErrorsWebpackPlugin from "friendly-errors-webpack-plugin" works in Node.js and Bun because they support importing CommonJS modules. Named imports work only when Node.js can statically detect the exports.

Does friendly-errors-webpack-plugin work in Bun?

Yes. import "friendly-errors-webpack-plugin" loaded successfully in Bun 1.4 on Sep 9, 2026.

Does friendly-errors-webpack-plugin ship TypeScript types?

Not bundled. Install the community types with "npm install -D @types/friendly-errors-webpack-plugin".

Links

Other commonjs packages

Similar popularity