You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Somehow tree shaking isn't working for me. I end up with a JavaScript file of 40kB when I do:
import { Alert, Collapse } from 'bootstrap.native';
Doing the equivalent in Bootstrap 5 JS will give me a 13kB file:
import { Alert } from 'bootstrap/js/src/alert.js';
import { Collapse } from 'bootstrap/js/src/collapse.js';
WebPack is configured with:
{
mode: 'production',
optimization: {
usedExports: true, // tree shaking
minimize: true,
minimizer: [
new TerserPlugin(),
]
}
}
And my package.json has "sideEffects": false in it.
Is there anything I'm still doing wrong, or is this a bug in the package?
As a sidenote, I would have loved to use the old approach of importing from sub files directly. This is no longer possible due to the exports section in package.json.
The text was updated successfully, but these errors were encountered:
Somehow tree shaking isn't working for me. I end up with a JavaScript file of 40kB when I do:
Doing the equivalent in Bootstrap 5 JS will give me a 13kB file:
WebPack is configured with:
And my
package.json
has"sideEffects": false
in it.Is there anything I'm still doing wrong, or is this a bug in the package?
As a sidenote, I would have loved to use the old approach of importing from sub files directly. This is no longer possible due to the
exports
section inpackage.json
.The text was updated successfully, but these errors were encountered: