import-size icon indicating copy to clipboard operation
import-size copied to clipboard

Feature request package.json & programmatic usage

Open OZZlE opened this issue 4 years ago • 1 comments

First of all this seems like an amazing module! Amazing job!

  1. It would be pretty awesome if the vscode plugin could show approx. module sizes from package.json for an overview. I realise it might depend on what you use from the module but it could be something like 'from x kb to y kb' perhaps? (if this one is done I probably don't even need point 2 :P)

  2. Also I would like to build further from this, is it possible to use this programmatically? If so could it be mentioned in docs? Something like?

    import importSize from 'import-size'

    importSize.calculate('react-dom', { options } )

OZZlE avatar May 03 '21 15:05 OZZlE

I think you are looking for this package / VS Code extension: https://marketplace.visualstudio.com/items?itemName=wix.vscode-import-cost / https://www.npmjs.com/package/import-cost, which is the underlying package that is being used here

mweststrate avatar May 03 '21 19:05 mweststrate