Created
July 22, 2019 15:07
-
-
Save Rafael-Martins/5c77f58942225fdb5fac1cac54350b2e to your computer and use it in GitHub Desktop.
CircularDependencyPlugin config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // webpack.config.js | |
| const CircularDependencyPlugin = require('circular-dependency-plugin') | |
| module.exports = { | |
| entry: "./src/index", | |
| plugins: [ | |
| new CircularDependencyPlugin({ | |
| // exclude detection of files based on a RegExp | |
| exclude: /a\.js|node_modules/, | |
| // add errors to webpack instead of warnings | |
| failOnError: true, | |
| // allow import cycles that include an asyncronous import, | |
| // e.g. via import(/* webpackMode: "weak" */ './file.js') | |
| allowAsyncCycles: false, | |
| // set the current working directory for displaying module paths | |
| cwd: process.cwd(), | |
| }) | |
| ] | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment