import-size
import-size copied to clipboard
Feature request package.json & programmatic usage
First of all this seems like an amazing module! Amazing job!
-
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)
-
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 } )
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