[Bundle visualiser] - does it show minified version of the files?


#1

Does anyone know?

Also I’ve found that it displays incorrect (bigger!) sizes for .css files than their actual size on disk. Why would that happen?


#2

#3

Yes, I’ve read it. And after I’ve read it I’ve got those two questions above :grin:

I assume it shows minified version.
But why are .css files get bigger??
In particular I was profiling 'antd' component library (to find out why adding a single Datepicker component adds 400kb to my app :open_mouth:) and it turned out that .js files were of lesser size than on disk, but .css files were bigger!


#4

Hello, you should import antd like this

import { default as DatePicker } from 'antd/lib/date-picker';

and not

import { DatePicker } from 'antd';

with the first way Meteor will include only the DatePicker file in your bundle.


#5

Thank you for the advice, but unfortunately, the DatePicker component itself weights about 400kb! (I’ve used bundle-visualiser to measure)
Here’s an issue with detailed analysis of what is being imported.

Btw, you don’t need default keyword. Just use

import Datepicker from 'antd/lib/date-picker'