Error importing rsuite/dist/rsuite-no-reset.min.css
Opened this issue · 4 comments
What version of rsuite are you using?
5.64.0
What version of React are you using?
18.3.1
What version of TypeScript are you using (if any)?
5.3.3
What browser are you using?
Chrome
Describe the Bug
On every compilation, my Next js app with Tailwind can't import the rsuite/dist/rsuite-no-reset.min.css.
My default imports from root layout:
import { Toaster } from "@/components/ui/toaster";
import { GetCookieProvider } from "@/utils/store/cookiesStore";
import { PermissionsProvider } from "@/utils/store/permissionContext";
import { CookiesProvider } from "next-client-cookies/server";
import { Inter } from "next/font/google";
import { CustomProvider } from "rsuite";
import { ptBR } from "rsuite/esm/locales";
import "./globals.css";
import "rsuite/dist/rsuite-no-reset.min.css";
Expected Behavior
No response
To Reproduce
No response
Hi @instituto-allamo, you mean you can't import .css.map
file?
Hi @instituto-allamo, you mean you can't import
.css.map
file?
No, the import is the '.css' file as described, but the Next js console on vs code is getting error 404 importing the .min.css.map
What you want to ask is the 404 error of the .css.map
file? Or the imported .css
component style is not effective?
If the component style is not effective, please refer to this example: https://github.com/rsuite/rsuite/tree/main/examples/with-nextjs-app
If you want to solve the problem of the 404 of the .css.map
file, this should be related to the Nextjs CSS Loader configuration. You can try to move import "rsuite/dist/rsuite-no-reset.min.css";
to ./globals.css
to try it out.
@import "~rsuite/dist/rsuite-no-reset.css";
What you want to ask is the 404 error of the
.css.map
file? Or the imported.css
component style is not effective?If the component style is not effective, please refer to this example: https://github.com/rsuite/rsuite/tree/main/examples/with-nextjs-app
If you want to solve the problem of the 404 of the
.css.map
file, this should be related to the Nextjs CSS Loader configuration. You can try to moveimport "rsuite/dist/rsuite-no-reset.min.css";
to./globals.css
to try it out.@import "~rsuite/dist/rsuite-no-reset.css";
The style is effective.
About the 404 problem, I tried to move the import to globals.css but the warning remains the same.