diff --git a/bin/build-lib.js b/bin/build-lib.js index 80e358a858..a59e7b4aa4 100644 --- a/bin/build-lib.js +++ b/bin/build-lib.js @@ -25,6 +25,7 @@ const META_FILES = [ // So, if we are being built using rollup, this require() won't have a `.default` property. const esPackagesThatNeedSpecialTreatmentForRollupInterop = [ 'get-form-data', + 'cropperjs', ] function lastModified (file, createParentDir = false) { diff --git a/packages/@uppy/image-editor/src/Editor.jsx b/packages/@uppy/image-editor/src/Editor.jsx index 4fade3be58..32813534ee 100644 --- a/packages/@uppy/image-editor/src/Editor.jsx +++ b/packages/@uppy/image-editor/src/Editor.jsx @@ -1,10 +1,6 @@ -import CropperImport from 'cropperjs' +import Cropper from 'cropperjs' import { h, Component } from 'preact' -// @TODO A silly hack that we can get rid of when we start publishing ESM to the npm package. -// eslint-disable-next-line no-underscore-dangle -const Cropper = CropperImport.__esModule ? CropperImport.default : CropperImport - export default class Editor extends Component { constructor (props) { super(props)