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

Slice a portion of file content after webpack compression and minification #206

Open
sushilprj opened this issue Jul 17, 2019 · 2 comments

Comments

@sushilprj
Copy link

I am using webpack 4+ and react application with react-s3-upload library. When I compile my react application, it's compiled successfully without any issue but a portion of the file content skipped during this process. Here is the file -
https://github.com/odysseyscience/react-s3-uploader/blob/master/ReactS3Uploader.js
and this portion of file content skipped.

propTypes: { signingUrl: PropTypes.string, getSignedUrl: PropTypes.func, preprocess: PropTypes.func, onSignedUrl: PropTypes.func, onProgress: PropTypes.func, onFinish: PropTypes.func, onError: PropTypes.func, signingUrlMethod: PropTypes.string, signingUrlHeaders: PropTypes.oneOfType([ PropTypes.object, PropTypes.func ]), signingUrlQueryParams: PropTypes.oneOfType([ PropTypes.object, PropTypes.func ]), signingUrlWithCredentials: PropTypes.bool, uploadRequestHeaders: PropTypes.object, contentDisposition: PropTypes.string, server: PropTypes.string, scrubFilename: PropTypes.func, s3path: PropTypes.string, inputRef: PropTypes.func, autoUpload: PropTypes.bool }

I am using the terser library to minify JS file.
Please let me know if you need more insight on this.

@cyrill62
Copy link

I get the same issue.

I finished by wrap ReactS3Uploader class to redefine propTypes :

const MyUploader = ReactS3Uploader

MyUploader.propTypes = {
   // Copy propTypes from here : https://github.com/odysseyscience/react-s3-uploader/blob/master/ReactS3Uploader.js#L12
}

export default MyUploader

@sushilprj
Copy link
Author

Thanks @cyrill62 for responding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants