Get filesize based on filesize lib.
npm install -S @jswork/next-filesize
import '@jswork/next-filesize';
nx.filesize('/page/testfile.js', { bits: true });
// { size: 421, sizeOf: '3.29Kb' }
- https://github.com/avoidwork/filesize.js
- https://stackoverflow.com/questions/42363140/how-to-find-the-size-of-the-file-in-node-js
Code released under the MIT license.