mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 19:07:08 +00:00
update(circular-dependency-plugin): 'include' option v5.2 (#44997)
- 'include' option - minor version bump - minor docs changes https://github.com/aackerman/circular-dependency-plugin#basic-usaget https://github.com/aackerman/circular-dependency-plugin/blob/master/index.js#L10 https://github.com/aackerman/circular-dependency-plugin/blob/master/index.js#L31 Thanks!
This commit is contained in:
parent
74abeec2ad
commit
1e0c4f29ed
@ -1,5 +1,5 @@
|
||||
import * as CircularDependencyPlugin from 'circular-dependency-plugin';
|
||||
import * as webpack from 'webpack';
|
||||
import CircularDependencyPlugin = require('circular-dependency-plugin');
|
||||
import webpack = require('webpack');
|
||||
|
||||
new CircularDependencyPlugin();
|
||||
new CircularDependencyPlugin({});
|
||||
@ -11,6 +11,7 @@ new CircularDependencyPlugin({
|
||||
allowAsyncCycles: false,
|
||||
cwd: process.cwd(),
|
||||
exclude: /a\.js|node_modules/,
|
||||
include: /dir/,
|
||||
failOnError: true,
|
||||
onDetected({ module: webpackModuleRecord, paths, compilation }) {
|
||||
numCyclesDetected++;
|
||||
|
||||
26
types/circular-dependency-plugin/index.d.ts
vendored
26
types/circular-dependency-plugin/index.d.ts
vendored
@ -8,6 +8,9 @@ import { Plugin, Module, compilation } from 'webpack';
|
||||
|
||||
export = CircularDependencyPlugin;
|
||||
|
||||
/**
|
||||
* Detect modules with circular dependencies when bundling with webpack.
|
||||
*/
|
||||
declare class CircularDependencyPlugin extends Plugin {
|
||||
constructor(options?: CircularDependencyPlugin.Options);
|
||||
// Not exposing `isCyclic` because it isn't meant to be public, I believe
|
||||
@ -15,15 +18,34 @@ declare class CircularDependencyPlugin extends Plugin {
|
||||
|
||||
declare namespace CircularDependencyPlugin {
|
||||
interface Options {
|
||||
/**
|
||||
* @default false
|
||||
*/
|
||||
allowAsyncCycles?: boolean;
|
||||
/**
|
||||
* @default process.cwd()
|
||||
*/
|
||||
cwd?: string;
|
||||
/**
|
||||
* @default /$^/
|
||||
*/
|
||||
exclude?: RegExp;
|
||||
/**
|
||||
* @default /.*\/
|
||||
*/
|
||||
include?: RegExp;
|
||||
/**
|
||||
* @default false
|
||||
*/
|
||||
failOnError?: boolean;
|
||||
onDetected?: (x: {
|
||||
/**
|
||||
* @default false
|
||||
*/
|
||||
onDetected?: false | ((x: {
|
||||
module: Module;
|
||||
paths: string[];
|
||||
compilation: compilation.Compilation;
|
||||
}) => void;
|
||||
}) => void);
|
||||
onEnd?: (x: { compilation: compilation.Compilation }) => void;
|
||||
onStart?: (x: { compilation: compilation.Compilation }) => void;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user