Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature]: Click on a file, know everywhere it's imported #154

Open
hipstersmoothie opened this issue Jan 25, 2024 · 3 comments
Open

[Feature]: Click on a file, know everywhere it's imported #154

hipstersmoothie opened this issue Jan 25, 2024 · 3 comments
Milestone

Comments

@hipstersmoothie
Copy link

What problem does this feature solve?

rsdoctor doesn't have a way that I can find to show all the source files included in the bundle. I'd like to be able to see that and click on files to see why they were imported.

This

CleanShot 2024-01-24 at 22 24 08@2x

What does the proposed API look like?

A treeview of all the src files included in the bundle. Clicking a file show contents/metadata and most importantly and visual of the files that imported it. That could look like a tree that only shows relevant files

@easy1090
Copy link
Collaborator

easy1090 commented Jan 26, 2024

I guess you want this page's functions: https://rsdoctor.dev/guide/usage/bundle-size.

duplicate packages section just to show the reason why package imported.

@hipstersmoothie
Copy link
Author

that doesn't really encompass what I want either.

really what I want is to:

  • view a file
  • see why it's in the bundle

for example:

given the imports: a.js => b.,js => c.js => d.js

I can go somewhere to view d.js and see all the file paths that end up importing it

@easy1090
Copy link
Collaborator

easy1090 commented Feb 19, 2024

that doesn't really encompass what I want either.

really what I want is to:

  • view a file
  • see why it's in the bundle

for example:

given the imports: a.js => b.,js => c.js => d.js

I can go somewhere to view d.js and see all the file paths that end up importing it

@hipstersmoothie Sorry, I just saw your reply.
I roughly understand what you mean.

  • First:

given the imports: a.js => b.,js => c.js => d.js

The following picture is the display of the reference chain you want, but here is the vertical display of 🔽.
image

  • Second:

I can go somewhere to view d.js and see all the file paths that end up importing it

In fact, we also have it, but it's not as clear as you want.https://rsdoctor.dev/guide/usage/module-analysis
I'll think add interaction here in the duplicate package, and click to show which files the file is referenced.

I will take this as a feature. It takes more consideration to display and interact. You can continue to pay attention to this issue.

@easy1090 easy1090 added this to the 0.2.0 milestone Feb 21, 2024
@easy1090 easy1090 removed this from the 0.2.0 milestone Jul 2, 2024
@easy1090 easy1090 added this to the 1.0.0 milestone Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants