Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@uppy/image-editor: remove CJS-interop hack in the source code #3778

Merged
merged 1 commit into from
May 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions bin/build-lib.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
6 changes: 1 addition & 5 deletions packages/@uppy/image-editor/src/Editor.jsx
Original file line number Diff line number Diff line change
@@ -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)
Expand Down