Topic: Integrating mdbootstrap in my NuxtJS project
Jakub Mandra staff premium answered 6 years ago
Jakub Strebeyko staff answered 6 years ago
Good news, everyone!
https://mdbootstrap.com/articles/vue/mdb-vue-nuxt-js-quick-start-guide/
thomas@rainmaker.travel commented 6 years ago
The problem with this guide is that it covers only MDB Vue.
The pro version makes use of a very outdated 'vue-perfect-scrollbar' in pro/Scrollbar.vue which is not supported by SSR.
As a result you will receive a 'window is not defined' error until things are changed.
Mikołaj Smoleński staff commented 6 years ago
Thanks for reporting the issue. We'll try to fix it as soon as possible.
Best regards
Mikołaj Smoleński staff answered 7 years ago
degfra answered 6 years ago
Mikołaj Smoleński staff commented 6 years ago
For this moment we focus on the most important cases and tasks which in order to prepare all MDB jQuery components in MDB Vue package. Then we will be testing it with environment like Nuxt. I can't tell what is the ETA, but we have this issue in our memory. Best Regardsruudboon pro answered 6 years ago
Istiake Ahamed Novel answered 5 years ago
*_Using CDN_
Update the nuxt.config.js head section with the following code:
head: {
title: process.env.npm_package_name || "",
meta: [
{
charset: "utf-8"
}, {
name: "viewport",
content: "width=device-width, initial-scale=1"
}, {
hid: "description",
name: "description",
content: process.env.npm_package_description || ""
}
],
link: [
{
rel: "icon",
type: "image/x-icon",
href: "https://mdbcdn.b-cdn.net/favicon.ico"
}, {
rel: "stylesheet",
href: "https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css"
}
],
script: [
{
src: "https://code.jquery.com/jquery-3.4.1.slim.min.js",
type: "text/javascript"
}, {
src: "https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js",
type: "text/javascript"
}, {
src: "https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js",
type: "text/javascript"
}
]
},
Or you can see this link http://istiake.com/blog/how-to-use-jquery-in-nuxtjs/
Mikołaj Smoleński staff commented 5 years ago
Almost all scripts (without jQuery) are included in mdbvue module.
You can find installation guide here: https://mdbootstrap.com/docs/vue/getting-started/quick-start/#nuxt
Best regards
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- User: Free
- Premium support: No
- Technology: MDB Vue
- MDB Version: -
- Device: -
- Browser: -
- OS: -
- Provided sample code: No
- Provided link: No