Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


Topic: Reduce MDB5 bundle size

riomigal free asked 3 years ago


Hello

How can I reduce app.js deployment file size?

I am using it as described in the installation guide:

app.js:

import * as mdb from 'mdb-ui-kit';

export default { mdb, };

Deployment:

WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB). This can impact web performance. Assets: bundle.js (1.09 MiB)

WARNING in entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance. Entrypoints: bundle (1.09 MiB) bundle.js


Grzegorz Bujański staff answered 3 years ago


MDB package contains a lot of components and unfortunately, it is associated with large file size.

If you want, you can use our source files and decide for yourself which components will be used, and thus what the file size will be after the build. We have prepared a special tool - webpack starter in which we described how to use source files. You just need to remember that some components use other components - for example, Sidenav uses Collapse. Therefore, if you get any error that suggests a component is missing, you will have to add it as well. Webpack starter is available on our Github: https://github.com/mdbootstrap/mdb-webpack-starter



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB Standard
  • MDB Version: 3.2.0
  • Device: Notebook
  • Browser: Chrome
  • OS: Windows
  • Provided sample code: No
  • Provided link: No
Tags