import-size
import-size copied to clipboard
Crash when using multiple imports
So these two commands will work as intended:
npx import-size --report powerbi-client
npx import-size --report highcharts
I've tried a few other packages and they all work fine. But when I supply multiple packages, it goes south:
> npx import-size --report highcharts powerbi-client
Creating build 2/3
Error: Invalid import: 'powerbi-client'
at C:\...\npm-cache\_npx\8db025f95d6e6ad3\node_modules\import-size\index.js:26:13
at Array.forEach (<anonymous>)
at generateImports (C:\...\npm-cache\_npx\8db025f95d6e6ad3\node_modules\import-size\index.js:24:16)
at C:\...\npm-cache\_npx\8db025f95d6e6ad3\node_modules\import-size\index.js:45:7
at new Promise (<anonymous>)
at analyze (C:\...\npm-cache\_npx\8db025f95d6e6ad3\node_modules\import-size\index.js:41:10)
at runReport (C:\...\npm-cache\_npx\8db025f95d6e6ad3\node_modules\import-size\index.js:168:26)
I'm on Windows 10, regular command prompt, Node.js 16.18.0, npm 8.19.2. Npx is just using the latest published version of import-size, iinm.