-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Global CSS import error on NextJS #10
Comments
Thank you for your discovery. When I encapsulated Winbox's CSS files into this component, I didn't consider so much. At that time, my idea was that this CSS file belongs to the |
hi @RickoNoNo3 @austinbuckler, any fix for this? |
@sugamkarki I'm new to NextJS still now, is my previous proposal feasible? It will be fixed for soon if possible. |
Hi @RickoNoNo3, any updates on this? |
I have fixed it by Here is the details in
|
@austinbuckler @sugamkarki @cokencorn
import 'winbox/dist/css/winbox.min.css';
import 'winbox/dist/css/themes/modern.min.css'; // optional
import 'winbox/dist/css/themes/white.min.css'; // optional
//import WinBox from 'react-winbox'; // do not use this, use below:
import dynamic from 'next/dynamic';
const WinBox = dynamic(() => import('react-winbox'), {ssr: false});
See our new doc for more. |
FYI -- I'm not too familiar with the NextJS 13.5.4 |
I get a failed to compile error when importing react-winbox in Next.JS due to react-winbox including the base styles. Users should choose to import these base styles vs react-winbox including them by default. I can provide a PR that fixes this if you'd like.
See error here:
The text was updated successfully, but these errors were encountered: