Reputation: 607
I'm trying to add a Flickity carousel to my application. After having followed the instructions on npm to the best of my ability I'm getting this error:
./~/flickity-fix/js/flickity.js Module not found: Can't resolve 'classie/classie' in '/Users/.../node_modules/flickity-fix/js'
I've added:
module: {
loaders: [
{
test: /flickity/,
loader: 'imports?define=>false&this=>window'
}
]
}
To my config.js folder as I do not have a webpack config file (as I'm using create-react-app).
I've scouted around and some people are having similar issues (notably here) but I can't seem to make their solutions work for me.
What am I missing here?
Upvotes: 1
Views: 1876
Reputation: 2032
{ test: /node_modules\/flickity/, loader: 'imports?define=>undefined' }
in the webpack config, and npm install imports-loader
if you don't already have it.
Upvotes: 1