react-winbox
react-winbox copied to clipboard
Global CSS import error on NextJS
![Screen Shot 2022-06-05 at 2 21 27 PM](https://user-images.githubusercontent.com/2755957/172069040-37b5adb2-5619-4c29-8382-7bcd267343a3.png)
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:
Global CSS cannot be imported from within node_modules.
Read more: https://nextjs.org/docs/messages/css-npm
Location: node_modules/react-winbox/dist/index.js```
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 winbox
package instead of react-Winbox
. If users need to import CSS by themselves, they will have to manually install the two packages at the same time--now they only need one. Now that you have found the problem, I need to think about how to balance the two things. How about creating a copy of the relevant CSS in this project?
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.