Trying to import react-image-crop
package using yarn and add it to react boilerplate
.
After installing the package getting this error
Module parse failed: /Users/...../frontend/node_modules/react-image-crop/lib/ReactCrop.js Unexpected token (62:25)
You may need an appropriate loader to handle this file type.
|
| function makeAspectCrop(crop, imageAspect) {
| const completeCrop = { ...crop };
|
| if (crop.width) {
@ ./app/components/ImageUpload/index.js 23:0-41
@ ./app/containers/HomePage/index.js
@ ./app/containers/HomePage/Loadable.js
@ ./app/containers/App/index.js
@ ./app/app.js
@ multi eventsource-polyfill webpa
The boilerplate is using babylons env
preset so the spread operator should be available.
Any ideas what may be the cause?