{"id":13484293,"url":"https://github.com/wix/import-cost","last_synced_at":"2025-05-15T03:04:58.950Z","repository":{"id":37432428,"uuid":"97303808","full_name":"wix/import-cost","owner":"wix","description":"displays the import size of the package you are importing inside the code editor","archived":false,"fork":false,"pushed_at":"2024-03-23T18:56:29.000Z","size":3361,"stargazers_count":1366,"open_issues_count":77,"forks_count":70,"subscribers_count":275,"default_branch":"master","last_synced_at":"2025-05-15T03:04:36.073Z","etag":null,"topics":["perfmatters","performance","performance-analysis","performance-visualization","vscode","webpack","webperf"],"latest_commit_sha":null,"homepage":"https://marketplace.visualstudio.com/items?itemName=wix.vscode-import-cost","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wix.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2017-07-15T08:50:35.000Z","updated_at":"2025-05-06T01:44:54.000Z","dependencies_parsed_at":"2023-02-17T19:01:12.145Z","dependency_job_id":"8b762c43-f3ac-4c06-955d-c86de00a7107","html_url":"https://github.com/wix/import-cost","commit_stats":{"total_commits":344,"total_committers":23,"mean_commits":"14.956521739130435","dds":0.6976744186046512,"last_synced_commit":"b2db0c2eceeccc5284f5c4c4bc251ecc2d38af1d"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wix%2Fimport-cost","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wix%2Fimport-cost/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wix%2Fimport-cost/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wix%2Fimport-cost/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wix","download_url":"https://codeload.github.com/wix/import-cost/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254264765,"owners_count":22041793,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["perfmatters","performance","performance-analysis","performance-visualization","vscode","webpack","webperf"],"created_at":"2024-07-31T17:01:22.001Z","updated_at":"2025-05-15T03:04:58.898Z","avatar_url":"https://github.com/wix.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","Tools to analyze the cost of imports"],"sub_categories":["Webpack"],"readme":"# Import Cost ![Build Status](https://github.com/wix/import-cost/workflows/build/badge.svg) [![Stand With Ukraine](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/badges/StandWithUkraine.svg)](https://www.wix.com/stands-with-ukraine)\n[![](https://vsmarketplacebadge.apphb.com/version/wix.vscode-import-cost.svg)](https://marketplace.visualstudio.com/items?itemName=wix.vscode-import-cost) [![](https://vsmarketplacebadge.apphb.com/installs/wix.vscode-import-cost.svg)](https://marketplace.visualstudio.com/items?itemName=wix.vscode-import-cost)\n\nThis extension will display inline in the editor the size of the imported package.\nThe extension utilizes webpack in order to detect the imported size.\n\n![Example Image](https://citw.dev/_next/image?url=%2Fposts%2Fimport-cost%2F1quov3TFpgG2ur7myCLGtsA.gif\u0026w=1080\u0026q=75)\n\nThis project includes implementation of:\n * Import Cost [VSCode extension](packages/vscode-import-cost) - install it from [VSCode Marketplace](https://marketplace.visualstudio.com/items?itemName=wix.vscode-import-cost)\n * Import Cost [Node module](packages/import-cost) - use freely to implement extensions for other IDE (or contribute them to this repository)\n\nEnjoy!\n\n#### Third-Party Editor Plugin Links\n\n* [Jetbrains IDE Plugin](https://github.com/denofevil/import-cost)\n* [Atom Package](https://atom.io/packages/import-cost-atom)\n* [Vim Plugin](https://github.com/wix/import-cost/tree/master/packages/coc-import-cost) ([coc.nvim](https://github.com/neoclide/coc.nvim) extension)\n* [Vim Plugin](https://github.com/yardnsm/vim-import-cost)\n\n\n## Why \u0026 How\nWe detail the why and how in this blog post:\nhttps://citw.dev/posts/import-cost\n\n## Developer guidelines\n\nIn this project we use [npm workspaces](https://docs.npmjs.com/cli/v7/using-npm/workspaces) for managing the multiple packages.\n\n### Getting started\n\nIn order to start working all you need to do is:\n```sh\n$ git clone git@github.com:wix/import-cost.git\n$ npm install\n$ code packages/import-cost\n$ code packages/vscode-import-cost\n```\n\nOnce VSCode workspaces are open:\n* Hit `F5` to run tests in `import-cost`\n* Hit `F5` to run the `vscode-import-cost` extension in debug mode\n\n### Applying changes\n\nThanks to npm workspaces, we have a symbolic link in the `vscode-import-cost` node modules folder to the local `import-cost`, which makes applying changes very easy. You can verify that link exists by running the following command:\n\n```sh\n$ ls -la packages/vscode-import-cost/node_modules | grep import-cost\nlrwxr-xr-x    1 shahar  staff    17 Aug  6 09:38 import-cost -\u003e ../../import-cost\n```\n\nIf anything goes wrong and link does not exist, just run the following commands at the root of this project and npm will sort it out:\n```sh\n$ git clean -xdf\n$ npm install\n```\n\nAfter you make any changes to the `import-cost` node module, don't forget to trigger transpilation in order to see those changes when running the `vscode-import-cost` extension:\n```sh\n$ npm test\n```\n\n### Publishing changes\n\nWhen you are ready to publish a new version of the extension, you first need to publish a new version of `import-cost` (unless nothing changed there). This is done by first commiting all your changes, then simply run the following commands:\n```sh\n$ cd packages/import-cost\n$ npm version patch | minor | major\n$ git commit -a -m \"releasing version X.X.X\"\n$ git push\n$ npm publish\n```\n\nThen go ahead and release the extension with almost same steps (except for last one):\n```sh\n$ cd packages/vscode-import-cost\n$ npm version patch | minor | major\n$ git commit -a -m \"releasing version X.X.X\"\n$ git push\n$ vsce publish\n```\n\nDon't forget to update README.md with details of what is new in the released version...\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwix%2Fimport-cost","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwix%2Fimport-cost","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwix%2Fimport-cost/lists"}