Sooo huge
Tuch opened this issue ยท 9 comments
In first I love what are you're doing. Thank you guys. But I have one little question about the size of package. Size of react-dom ~29kb gzip, size of prismic-richtext ~17kb gzip.. It could be ok, but this is just a 'markup->html' library.. And I can't disable something here.. Mb we can optimize it? Or mb you can suggest something lighter?
There is an outdated PR that should solve this. Not sure why nothing is happening there:
#14
๐ I would also like to see some movement on the issue as prismic-richtext
is significantly increasing bundle size.
@arnaudlewis Are you able to release 1.0.0 to NPM? I can see you've labeled it here but it's not in the registry.
Thanks
All good @timReynolds ;)
Ok I spoke too soon, seems this now errors when being server rendered due to assuming window.
(node:35436) UnhandledPromiseRejectionWarning: ReferenceError: window is not defined
at Object.<anonymous> (/node_modules/prismic-richtext/dist/prismic-richtext.min.js:1:230)
In the middle of something else right now, will investigate this later in-depth
@timReynolds Yeah i've had this issue too - it's caused by a change from webpack v3 -> v4. I will create a PR with the fix shortly (it's only a one liner in the webpack config).
More info about the issue can be found here: webpack/webpack#6522
@arnaudlewis @timReynolds Fix for the issue is here #20