tiaanduplessis / next-circular-dependency

Detect circular dependencies in your Next.js app
MIT License
4 stars 1 forks source link

Add options instead of polluting next.config.js #2

Open satazor opened 4 years ago

satazor commented 4 years ago

Currently, to configure https://github.com/aackerman/circular-dependency-plugin we must inject properties into next.config.js, such as include or failOnError. Ideally, those would be passed as options instead, like:

withCircularDependency({ failOnError: true })(myNextConfig);

Here's an example of a official plugin written this way: https://github.com/zeit/next.js/blob/canary/packages/next-bundle-analyzer/index.js#L1

The good thing about this is that it will play nicely with https://www.npmjs.com/package/next-compose-plugins.

If you agree, I can make a PR. Thanks.

issue-label-bot[bot] commented 4 years ago

Issue-Label Bot is automatically applying the label feature_request to this issue, with a confidence of 0.97. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

boredland commented 1 month ago

⇾ We did that for our needs, perhaps you want to give it a try? https://github.com/playt-net/next-circular-dependency