-
Notifications
You must be signed in to change notification settings - Fork 3
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
feat: import cost - show the size of the imported package inline vscode #64
Comments
Hi @SohelIslamImran! We have access to the full Metro graph, meaning we should have that data available already. We only need to iterate over all files related to the module and count the With that, we can render the information in various places. |
Sounds great! It would be nice if someone build a vscode extension like Import Cost |
@byCedric Maybe I couldn't describe it properly. But it isn't my question that if we can get module size info and use that. I know we can. I'm just asking someone to create a vscode extension like Import Cost with this. Thanks |
It seems like part of the point of Atlas is a dogfood technology demo of an Expo app, but I do wonder about whether other forms should be explored, or whether that's consistent with the Atlas product strategy. In particular, you could imagine this outputting an image after a build and replying on a PR if the size increases like Codecov. You could imagine integration with Expo Tools VS Code extension, or another one. You could imagine this being integrated into EAS, or adding a log line on the terminal in the CLI when the bundle or an import size passes a threshold. I think the convenience of having this information glanceable where you work shouldn't be underestimated. Extending this to visualize other metrics is another possible direction, but it'd really depend on motivation and where Expo sees this going. To be clear, I think it's super useful now! |
I build an extension 😁 https://github.com/SohelIslamImran/expo-import-cost |
I can't publish🥲 because VSCode Marketplace requires Azure, and I tried to signup but failed. They require card information, but it is saying that there is something wrong with my card info. Maybe my country is not supported! Hey @byCedric, can I create a PR with https://github.com/SohelIslamImran/expo-import-cost as a package in this repo? Then you can publish and also improve more. |
This package is already great! But I think we can make it even greater, if we can show the size of the imported package inline in vscode. There is already a vscode extension called Import Cost which does that using webpack. I think if we can show the import size like now in the browser, then we should also be able to fork the Import Cost repo and add this package and create a new vscode extension to show inline file import size. It would be nice if someone takes some time and does that. It will be really mind-blowing and great to know the cost of and import while typing/importing.
The text was updated successfully, but these errors were encountered: