index.ts 692 B

123456789101112131415161718192021
  1. declare let __webpack_public_path__: string;
  2. declare let __webpack_nonce__: string;
  3. // Check if we are hosting files on cdn and set webpack public path
  4. if (window.public_cdn_path) {
  5. __webpack_public_path__ = window.public_cdn_path;
  6. }
  7. // This is a path to the public folder without '/build'
  8. window.__grafana_public_path__ =
  9. __webpack_public_path__.substring(0, __webpack_public_path__.lastIndexOf('build/')) || __webpack_public_path__;
  10. if ((window as any).nonce) {
  11. __webpack_nonce__ = (window as any).nonce;
  12. }
  13. // This is an indication to the window.onLoad failure check that the app bundle has loaded.
  14. window.__grafana_app_bundle_loaded = true;
  15. import app from './app';
  16. app.init();