Closed varunarora closed 2 years ago
Hi @varunarora,
Most likely this is because UglifyJS doesn’t understand this syntax. This shorthand method definition syntax is valid JS.
For the published draftjs-conductor package, the syntax is automatically converted to valid ES5 code for the best compatibility:
unregister: function unregister() {
editorElt.removeEventListener("copy", onCopyCut);
editorElt.removeEventListener("cut", onCopyCut);
}
Please make sure you’re using the published package on the npm registry – this is the only supported way to use this project.
https://github.com/thibaudcolas/draftjs-conductor/blob/e8abd65b653f6eca239d4119ba635ada34bc0b0a/src/lib/api/copypaste.js#L142
This line is giving my UglifyJS webpack config this error:
Possible to resolve somehow?