Skip to content

Commit

Permalink
Added README documentation for parameter in onDetected
Browse files Browse the repository at this point in the history
  • Loading branch information
aackerman committed Aug 29, 2017
1 parent 7025b63 commit bbc5325
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ module.exports = {
failOnError: true,
// override `exclude` and `failOnError` behavior
// `onDetected` is called for each module that is cyclical
onDetected({ paths, compilation }) {
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(' -> ')))
}
})
Expand Down

0 comments on commit bbc5325

Please sign in to comment.