Pace will automatically monitor your Ajax requests, event loop lag, document ready state and elements on your page to decide on the progress.
If you use AMD or Browserify, require pace.js and call pace.start()
as early in the loading process as is possible.
<head>
<script src="./pace-esm/pace.js"></script>
<link href="./pace-esm/themes/pace-theme-barber-shop.css" rel="stylesheet" />
</head>
import Pace from 'pace-esm/pace.js';