riomigal free asked 3 years ago


I am using module imports, but it imports the whole library.

E.g. if I want to import

import { Modal } from 'mdb-ui-kit';

Webpack compiles the whole library in prod mode: (Laravel 8 Project)

      /css/app.css    124 KiB       0  [emitted]         /js/app    
        /js/app.js   1.08 MiB       0  [emitted]  [big]  /js/app   

Could you please help?

Thank you

riomigal free commented 3 years ago

Anyone an idea?

Grzegorz Bujański staff answered 3 years ago

Hi. If you only need a few of our components, you should import them from the src folder. For a modal it will be:

import { Modal } from 'mdb-ui-kit/src/js/free/modal';

Please insert min. 20 characters.


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



Specification of the issue

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