Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 745a583

Browse files
committed
export WebpackError
1 parent ec07eb0 commit 745a583

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

lib/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,9 @@ module.exports = mergeExports(fn, {
262262
get WatchIgnorePlugin() {
263263
return require("./WatchIgnorePlugin");
264264
},
265+
get WebpackError() {
266+
return require("./WebpackError");
267+
},
265268
get WebpackOptionsApply() {
266269
return require("./WebpackOptionsApply");
267270
},

types.d.ts

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9879,7 +9879,11 @@ declare class WebWorkerTemplatePlugin {
98799879
*/
98809880
apply(compiler: Compiler): void;
98819881
}
9882-
declare interface WebpackError extends Error {
9882+
declare class WebpackError extends Error {
9883+
/**
9884+
* Creates an instance of WebpackError.
9885+
*/
9886+
constructor(message?: string);
98839887
details: any;
98849888
module: Module;
98859889
loc: DependencyLocation;
@@ -9888,6 +9892,20 @@ declare interface WebpackError extends Error {
98889892
file: string;
98899893
serialize(__0: { write: any }): void;
98909894
deserialize(__0: { read: any }): void;
9895+
9896+
/**
9897+
* Create .stack property on a target object
9898+
*/
9899+
static captureStackTrace(targetObject: {}, constructorOpt?: Function): void;
9900+
9901+
/**
9902+
* Optional override for formatting stack traces
9903+
*/
9904+
static prepareStackTrace?: (
9905+
err: Error,
9906+
stackTraces: NodeJS.CallSite[]
9907+
) => any;
9908+
static stackTraceLimit: number;
98919909
}
98929910
declare abstract class WebpackLogger {
98939911
getChildLogger: (arg0: string | (() => string)) => WebpackLogger;
@@ -10547,6 +10565,7 @@ declare namespace exports {
1054710565
Stats,
1054810566
Template,
1054910567
WatchIgnorePlugin,
10568+
WebpackError,
1055010569
WebpackOptionsApply,
1055110570
WebpackOptionsDefaulter,
1055210571
Entry,

0 commit comments

Comments
 (0)