Closed leopucci closed 2 years ago
Seems that the path that i configured was wrong. I inserted a path string but it was a regexp. BTW did not detected anything on first config, I had to add the advanced mode
onStart({ compilation }) {
console.log('start detecting webpack modules cycles');
},
// `onDetected` is called for each module that is cyclical
onDetected({ module: webpackModuleRecord, paths, compilation }) {
// `paths` will be an Array of the relative module paths that make up the cycle
// `module` will be the module record generated by webpack that caused the cycle
compilation.errors.push(new Error(paths.join(' -> ')));
},
// `onEnd` is called before the cycle detection ends
onEnd({ compilation }) {
console.log('end detecting webpack modules cycles');
},
Then printed the circular dependency
Having some trouble configuring this plugin to work on the code!