raygun4js icon indicating copy to clipboard operation
raygun4js copied to clipboard

Add a bundle that excludes the web-vitals vendor scripts

Open samuel-holt opened this issue 3 years ago • 0 comments

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>

samuel-holt avatar Jun 14 '21 23:06 samuel-holt