I installed daterangepicker and moment in my symfony project with webpack
yarn add moment
yarn add daterangepicker
In webpack.config.js I have the following code:
.addPlugin(new webpack.ProvidePlugin({
'moment': 'moment',
'daterangepicker': 'daterangepicker',
}))
But when I import moment and daterangepicker and I try to use the method I get the following error:
daterangepicker is not a function
Is there something I’m missing out? Can you help me make daterangepicker work ?