Closed alexbowers closed 5 years ago
Is this just from the IDE? Or is it the actual output size?
Would be interesting to see if the editor is just sizing the file path, rather than the outfitted file
It is the actual output size too. Verified it with yarn prod
In my case. The build size using the destructuring option is 152K
and the other one 177K
. Do you know why?
import {
TogglesTrashed,
PerformsSearches,
HandlesValidationErrors
} from 'laravel-nova';
// import TogglesTrashed from 'laravel-nova/src/mixins/TogglesTrashed';
// import PerformsSearches from 'laravel-nova/src/mixins/PerformsSearches';
// import HandlesValidationErrors from 'laravel-nova/src/mixins/HandlesValidationErrors';
I was testing out my package, which uses one of the mixins that comes with Nova JS (HasCards.js).
The way that it is pulled in Nova JS examples is using:
however, you can pull in the file using:
and it has a massive filesize saving.
Using the example 1 your export is 80kb larger than the second one. They both do exactly the same thing.
Worth documenting.