Having trouble importing the react-image-crop
package with yarn and integrating it into a react boilerplate
.
Encountered an error after installing the package:
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 utilizing babylons env
preset, so the spread operator should be supported.
Any thoughts on what might be causing this issue?