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!

riomigal free asked 4 years ago


Hello,

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 4 years ago

Anyone an idea?


Grzegorz Bujański staff answered 4 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.

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: 2.0.0
  • Device: Notebook
  • Browser: Chrome
  • OS: Windows
  • Provided sample code: No
  • Provided link: No