[英]Error on importing MDB Sass file in Next.js for React
I am trying to use MDBootstrap in my Next.js project.我正在尝试在我的 Next.js 项目中使用 MDBootstrap。 But I want to override MDB color variables, so I just copied scss
folder from node-modules/mdbreact
and paste it in my public/assets
folder.但我想覆盖 MDB 颜色变量,所以我只是从node-modules/mdbreact
复制scss
文件夹并将其粘贴到我的public/assets
文件夹中。 When i import the mdb-free.scss
in my index.js
, it gives me error:当我在index.js
中导入mdb-free.scss
时,它给了我错误:
Module not found: Can't resolve '/assets/scss/mdb-free.scss'找不到模块:无法解析“/assets/scss/mdb-free.scss”
I don't know why, here is my project file screenshot:不知道为什么,这是我的项目文件截图:
I have install sass
in my project and i got this error while importing my sass file in _app.js
我在我的项目中安装了sass
,在 _app.js 中导入我的_app.js
文件时出现此错误
Can you help me with this?你能帮我解决这个问题吗? I wanna override MDB sass
color variables to my custom ones.我想将MDB sass
颜色变量覆盖为我的自定义颜色变量。 I am stuck我被困住了
I am trying to use MDBootstrap in my Next.js project.我正在尝试在我的 Next.js 项目中使用 MDBootstrap。 But I want to override MDB color variables, so I just copied scss
folder from node-modules/mdbreact
and paste it in my public/assets
folder.但我想覆盖 MDB 颜色变量,所以我只是从node-modules/mdbreact
复制scss
文件夹并将其粘贴到我的public/assets
文件夹中。 When i import the mdb-free.scss
in my index.js
, it gives me error:当我在index.js
中导入mdb-free.scss
时,它给了我错误:
Module not found: Can't resolve '/assets/scss/mdb-free.scss'找不到模块:无法解析“/assets/scss/mdb-free.scss”
I don't know why, here is my project file screenshot:不知道为什么,这是我的项目文件截图:
I have install sass
in my project and i got this error while importing my sass file in _app.js
我在我的项目中安装了sass
,在 _app.js 中导入我的_app.js
文件时出现此错误
Can you help me with this?你能帮我解决这个问题吗? I wanna override MDB sass
color variables to my custom ones.我想将MDB sass
颜色变量覆盖为我的自定义颜色变量。 I am stuck我被困住了
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.