here is my file of all loaders :
module.exports = [
{
test: /\.jsx?$/,
exclude: /(node_modules|bower_components)/,
loaders: ['react-hot', 'babel','babel-loader'],
},
{
test: /\.css$/,
loaders: [
'style?sourceMap',
'css?modules&importLoaders=1&localIdentName=[path]___[name]__[local]___[hash:base64:5]'
]
},
{
test: /\.eot(\?v=\d+\.\d+\.\d+)?$/,
loader: "file"
},
{
test: /\.(woff|woff2)$/,
loader: "url?prefix=font/&limit=5000"
},
{
test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/,
loader: "url?limit=10000&mimetype=application/octet-stream"
},
{
test: /\.svg(\?v=\d+\.\d+\.\d+)?$/,
loader: "url?limit=10000&mimetype=image/svg+xml"
},
{
test: /\.gif/,
loader: "url-loader?limit=10000&mimetype=image/gif"
},
{
test: /\.jpg/,
loader: "url-loader?limit=10000&mimetype=image/jpg"
},
{
test: /\.png/,
loader: "url-loader?limit=10000&mimetype=image/png"
}
];
@aishwarya-bote did you figure this out?
Yes, I did. Apparently, I was trying to import the daterangepicker as given in your examples folder from src folder (../src/components/DateRangePicker) which was causing the issue. Instead, now I do it as import DateRangePicker from 'react-dates' and it works.
Thanks
A bare-bone simple example can be found here: https://github.com/majapw/react-dates-demo/blob/master/src/App.js
Most helpful comment
Yes, I did. Apparently, I was trying to import the daterangepicker as given in your examples folder from src folder (
../src/components/DateRangePicker) which was causing the issue. Instead, now I do it asimport DateRangePicker from 'react-dates'and it works.Thanks