Topic: MDB 5 React Optimization
AlainOuellet pro asked 2 years 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 2 years ago
I'm not sure if I understand correctly. Are you planning to add MDB and Bootstrap separately to one project?
AlainOuellet pro commented 2 years 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 2 years 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
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- User: 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