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

Add a bundle that excludes the web-vitals vendor scripts #411

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

samuel-holt
Copy link
Contributor

@samuel-holt samuel-holt commented Jun 14, 2021

Overview

Developers may want to include the web-vitals base and polyfill scripts themselves due to environmental reasons* or to have better control over how the polyfill script is loaded (see the How to use the polyfill section for more details).

*There is a use of Set and WeakSet in the library that can cause issues when trying to support legacy browsers (e.g. older than IE11).

Updates

  • Add a new bundle that excludes the web-vitals vendor scripts in the Gruntfile
  • Update the readme with links to the new bundle

Example usage

<script type="text/javascript">
  !function(a,b,c,d,e,f,g,h){a.RaygunObject=e,a[e]=a[e]||function(){
  (a[e].o=a[e].o||[]).push(arguments)},f=b.createElement(c),g=b.getElementsByTagName(c)[0],
  f.async=1,f.src=d,g.parentNode.insertBefore(f,g),h=a.onerror,a.onerror=function(b,c,d,f,g){
  h&&h(b,c,d,f,g),g||(g=new Error(b)),a[e].q=a[e].q||[],a[e].q.push({
  e:g})}}(window,document,"script","//cdn.raygun.io/raygun4js/raygun.nowebvitals.min.js","rg4js");
</script>

Copy link
Contributor

@JasenPalmer JasenPalmer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for making this change. Looks good to me

Copy link
Contributor

@mduncan26 mduncan26 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good but to be honest raygun4js isnt where my expertise lies.

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

Successfully merging this pull request may close these issues.

3 participants