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: MDB 5 React Optimization

AlainOuellet pro asked 1 year ago


Do you have a tutorial that clearly explains how to install and configure to use Bootstrap components individually in an already running project?


Grzegorz Bujański staff answered 1 year ago


I'm not sure if I understand correctly. Are you planning to add MDB and Bootstrap separately to one project?


AlainOuellet pro commented 1 year ago

I already use bootstrap in my project and I import it this way "mdb-react-ui-kit": "./mdb-react-ui-kit-6.0.0.tgz",

I implement the components this way example: import { MDBBtn, MDBCard, MDBDatepicker } from 'mdb-react-ui-kit';

as you mentioned on this page, https://mdbootstrap.com/docs/react/getting-started/optimization/ I would now like to import them this way import MDBDatepicker from 'mdb-react-ui-kit/modules/MDBDatepicker' and I get this error. Module not found: Error: Can't resolve 'mdb-react-ui-kit/modules/MDBDatepicker'


Grzegorz Bujański staff commented 1 year ago

In version 6.0.0, it is no longer necessary to import modules separately. The package is already optimized and there is no need to create separate modules. Modularity should be supported by default without any changes. However, in some cases, it doesn't work properly. We're already working on it. We'll fix that in the next release



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: Pro
  • Premium support: No
  • Technology: MDB React
  • MDB Version: MDB5 6.0.0
  • Device: Windows
  • Browser: Chrome
  • OS: Windows
  • Provided sample code: No
  • Provided link: No