Comments (5)
I'll take this into consideration, but I'm not changing the base output right now. In v4.x I've provided the onDetected
method as an escape hatch for customization.
Please take a look at that and let me know if it doesn't resolve your concerns.
from circular-dependency-plugin.
i actually use my own implementation, based on your source. My intention was to share my improvements which i think some devs would be happy to see. Actually points 2. and 3. are the main reasons why i had to roll up my own implementation.
Points 1. and 2. are solvable with onDetected
. That callback is nice to have for little adjustments like the log format. But point 3. is a bit more complicated. One would have to track all previously detected circular dependencies and also reset that information before a rebuild (watch mode). From that callback only one does not know when to reset the tracked information. Further, that kind of logic would clutter the configuration file. That should happen inside the plugin.
from circular-dependency-plugin.
@giniedp do you have a specific example where a circular dependency is reported more than one time?
from circular-dependency-plugin.
if foo.ts
and bar.ts
both require each other, then the plugin reports 2 detections
foo.ts -> bar.ts -> foo.ts
and
bar.ts -> foo.ts -> bar.ts
from circular-dependency-plugin.
I'm seeing the same behavior, if I have N files in a circular reference, I'll see N lines of output for the chain.
Here's a gist with a full example: https://gist.github.com/Retsam/9c35799c3b1867d9a1170f8c04301308, and here's the output I get when I webpack it:
WARNING in Circular dependency detected:
a.js -> b.js -> c.js -> a.js
WARNING in Circular dependency detected:
b.js -> c.js -> a.js -> b.js
WARNING in Circular dependency detected:
c.js -> a.js -> b.js -> c.js
from circular-dependency-plugin.
Related Issues (20)
- Typescript Type Dependencies Not Found HOT 2
- still has warnning when excluded HOT 1
- SASS files fail with error that file is circular dependency of itself HOT 3
- Named exports and imports circulars HOT 1
- webpack@5 support HOT 20
- Performance degradation webpack 5.3.2 + this plugin 5.2.2 on recompile HOT 3
- Improve readme.md
- [email protected] support with circular dependency HOT 3
- Circular dependency checker can be slow HOT 1
- Support for ignoring lazy (not weak) async imports HOT 2
- Webpack 5 HOT 4
- Support for ignore React.lazy async imports
- Log to file? HOT 2
- @types/circular-dependency-plugin is not compatible with Webpack 5 HOT 3
- Cannot read property 'tap' of undefined HOT 1
- TypeError: plugin.options.include.test is not a function HOT 2
- This plugin does not appear to work in webpack=> 4.64.4 typeScript => 4.5.5 react=> 17.0.2 environments HOT 2
- Escaped forward slashes in paths do not work on Windows
- Fast builds during development HOT 2
- [FR] Vite Support HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from circular-dependency-plugin.