Closed kiran-bhalerao closed 5 years ago
react version?
react 16.8.4
If you're using Webpack, you need to teach it how to support CSS files. in module.resolve, either add the following:
{
test: /\.css$/,
include: /node_modules/,
loaders: ['style-loader', 'css-loader'],
}
or, if you already have a config for styling, modify test
RegExp so that it would cover *.css
files, too.
I'm having this same issue with NextJS.
EDIT. I was able to fix it importing the no-style version and then importing styles manually right into app:
import 'react-clock/dist/Clock.css';
import 'react-time-picker/dist/TimePicker.css';
import TP, { TimePickerProps } from 'react-time-picker/dist/entry.nostyle';
@focux could you provide a working example for this solution please? Thanks
I'm having a similar issue except that I'm using Vitejs as bundler.
If I try to skip importing css, here's the error I get: