Closed wachunga closed 4 years ago
Thanks for this.
I absolutely agree with you, and I had the same concerns back when the PR including this behaviour was made by the big boss of Netlify himself :fearful: but there didn't actually seem to be a good way around it at the time.
I think it's there because of the way Netlify Identity works on invite signups, but if you have any ideas on how it could be offloaded from the frontend, I'm all ears!
Possible alternatives to loading the Identity widget on every single page, could be to either:-
Load the widget only on the site's root /
e.g.
_includes/components/head.njk
{% if page.url == "/" %}
<script async src="https://identity.netlify.com/v1/netlify-identity-widget.js"></script>
{% endif %}
or set up Netlify Identity email templates, modifying the Identity invite email link to point to somewhere like /admin/index.html
or perhaps a separate page where you load the Identity widget.
Closing this for now but I will re-open if there is still interest in the issue.
Thanks, that works.
netlify-identity-widget.js is adding 184kb (unminified) js to each page. Is it possible to restrict that to only necessary pages? https://github.com/danurbanowicz/eleventy-netlify-boilerplate/blob/master/_includes/components/head.njk#L6
I like to keep the page weight low :)