-
Notifications
You must be signed in to change notification settings - Fork 94
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
Requiring slug with browserify includes a 1.8MB file #59
Comments
just curious, why are you generating slugs on the client side? |
i would make an endpoint you can call. |
With all due respect, that's besides the point. Nowadays npm packages are increasingly being used isomorphically, especially with platforms like Meteor. For a precedent, see the |
with all due respect just because they can be used isomorphically doesn't mean they should be used that way. |
FWIW We were bit by this same issue it tripled the size of our clientside webpacked bundle. To be fair we discovered your module as a result of our previous routing work on the backend but the 1.8mb payload was a bit of a surprise. Replaced with https://github.com/pid/speakingurl |
You can use We also use slugs client-side because it's far faster then calling an endpoint just to give the user a quick preview and the minified code is tiny. |
I ran into the same problem too. @michaelfavia thanks for mentioning https://github.com/pid/speakingurl: 12.7KB vs. 1.7MB!!! |
After some investigation into why my Browserify output file was so huge, I found the unicode dependency in
package.json
(https://www.npmjs.com/package/unicode) contains a 1.8MB file calledSo.js
. How important is this file, and is there any way we can do without it? I can't continue using slug for my front-end application if it means doubling the footprint of my Browserify fileThe text was updated successfully, but these errors were encountered: