feat: refactoring project

This commit is contained in:
Carlos
2024-11-23 14:56:07 -05:00
parent f0c2a50c18
commit 1c6db5818d
2351 changed files with 39323 additions and 60326 deletions

View File

@@ -15,6 +15,7 @@ class IgnoreWarningsPlugin {
constructor(ignoreWarnings) {
this._ignoreWarnings = ignoreWarnings;
}
/**
* Apply the plugin
* @param {Compiler} compiler the compiler instance
@@ -22,15 +23,11 @@ class IgnoreWarningsPlugin {
*/
apply(compiler) {
compiler.hooks.compilation.tap("IgnoreWarningsPlugin", compilation => {
compilation.hooks.processWarnings.tap(
"IgnoreWarningsPlugin",
warnings => {
return warnings.filter(warning => {
return !this._ignoreWarnings.some(ignore =>
ignore(warning, compilation)
);
});
}
compilation.hooks.processWarnings.tap("IgnoreWarningsPlugin", warnings =>
warnings.filter(
warning =>
!this._ignoreWarnings.some(ignore => ignore(warning, compilation))
)
);
});
}