wojtekmaj/react-time-picker

Next.js doesn't allow importing CSS files

neaorin opened this issue · 1 comments

Trying to use TimePicker in a Next.js project, I get the following error:

Failed to compile

../../node_modules/react-clock/dist/Clock.css
Global CSS cannot be imported from within node_modules.
Read more: https://nextjs.org/docs/messages/css-npm
Location: ....\node_modules\react-time-picker\dist\entry.js

Is it possible to ship a compiled version of Clock.css?

Thank you.

In Next.js, you'd need to import CSS yourself by following these instructions:

https://github.com/wojtekmaj/react-time-picker#custom-styling

Or don't import CSS at all and create your own styles as you like.