-
Notifications
You must be signed in to change notification settings - Fork 174
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
dist is very large #86
Comments
Haven't used this library in years. No current plans to update it and no desire to maintain it. Would be happy to give you permission to publish an update though if you'd be interested? |
Thanks for the reply! Unfortunately I don't think I'll get any time to look into it any time soon :( I ended up using a different library instead. |
I've noticed the same and tried to spend some time to reduce the bundle size, however I'm not able to get anywhere with adding this babel plugin: https://www.npmjs.com/package/babel-plugin-transform-react-remove-prop-types Could it be because the version of babel is too old (babel 5.x)?
|
Forked, fixed, modernised and published to npm as react-highlighter-words https://www.npmjs.com/package/react-highlighter-words |
|
dist/main.js
is 57 KB: https://unpkg.com/react-highlight-words@0.16.0/dist/. Looking at the JS file, it appears to have chunks of React init (eg. PropTypes): https://unpkg.com/react-highlight-words@0.16.0/dist/main.jsIf I use your code from Git rather than npm, it shaves 13 KB off the minified size, mainly due to no longer including duplicate modules in the bundle, and PropTypes properly using the production mode. In my package.json I'm doing:
Would it be possible to publish an ES6 Module version to npm too, so as to not introduce duplicate modules to apps that want to use this one?
Thanks!
The text was updated successfully, but these errors were encountered: