Skip to content

Commit

Permalink
Merge pull request #38 from xwp/update/web-vitals
Browse files Browse the repository at this point in the history
Update/web vitals
  • Loading branch information
mehigh authored Jun 16, 2021
2 parents a8e63a2 + a9eb0b8 commit 473b586
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ add_theme_support( 'site_performance_tracker_vitals', array(

## Changelog

#### 0.9 - June 16, 2021

* Update web vitals JS library to 2.0.1

#### 0.8 - May 28, 2021

* Remove Performance Observer functionality
Expand Down
2 changes: 1 addition & 1 deletion js/dist/module/web-vitals-analytics.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('wp-polyfill'), 'version' => '0e7c85f1a6e193be6c642a2b62797d76');
<?php return array('dependencies' => array('wp-polyfill'), 'version' => '6d4d277887ef7b84cddf6aca22f66dc5');
2 changes: 1 addition & 1 deletion js/dist/module/web-vitals-analytics.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@
"format:js": "npm run lint:js -- --fix"
},
"dependencies": {
"web-vitals": "^1.1.1"
"web-vitals": "^2.0.1"
}
}
2 changes: 1 addition & 1 deletion php/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public function optimize_scripts( $tag, $handle ) {

// Replaces only the first occurrence of src in the tag. Avoids replacing inside inline scripts.
if ( false !== strpos( $tag, ' src' ) ) {
return substr_replace( $tag, ' type="module" data-src', strpos( $tag, ' src' ), strlen( ' src' ) );
return substr_replace( $tag, ' type="module" defer data-src', strpos( $tag, ' src' ), strlen( ' src' ) );
}

return $tag;
Expand Down
2 changes: 1 addition & 1 deletion site-performance-tracker.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* Plugin Name: Site Performance Tracker
* Plugin URI: https://github.com/xwp/site-performance-tracker
* Description: Allows you to detect and track site performance metrics.
* Version: 0.8
* Version: 0.9
* Author: XWP.co
* Author URI: https://xwp.co
*/
Expand Down

0 comments on commit 473b586

Please sign in to comment.