Skip to content

Commit 0d4506d

Browse files
committed
chore: add circular-dependency-plugin and duplicate-package-checker-webpack-plugin
1 parent 6cfd446 commit 0d4506d

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

.fatherrc.ts

+14-7
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
11
import { codecovWebpackPlugin } from '@codecov/webpack-plugin';
2+
import DuplicatePackageCheckerPlugin from '@madccc/duplicate-package-checker-webpack-plugin';
3+
import CircularDependencyPlugin from 'circular-dependency-plugin';
24
import { defineConfig } from 'father';
35

46
class CodecovWebpackPlugin {
57
private options;
68
constructor(options = {}) {
7-
this.options = {
8-
enableBundleAnalysis: true,
9-
bundleName: 'webpack-bundle',
10-
gitService: 'github',
11-
disable: false,
12-
...options,
13-
};
9+
this.options = options;
1410
}
1511
apply(compiler: any) {
1612
return codecovWebpackPlugin(this.options).apply(compiler);
@@ -55,6 +51,17 @@ export default defineConfig({
5551
gitService: 'github',
5652
},
5753
]);
54+
memo.plugin('circular-dependency-checker').use(CircularDependencyPlugin, [
55+
{
56+
failOnError: true,
57+
},
58+
]);
59+
memo.plugin('duplicate-package-checker').use(DuplicatePackageCheckerPlugin, [
60+
{
61+
verbose: true,
62+
emitError: true,
63+
},
64+
]);
5865
}
5966
return memo;
6067
},

0 commit comments

Comments
 (0)