From 3b553beac65c1f249c3a9415e0293fa78dffe784 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sun, 30 Dec 2018 10:41:36 -0800 Subject: [PATCH] Update bootstrap.ts --- resources/assets/scripts/{bootstrap.js => bootstrap.ts} | 6 ++++++ 1 file changed, 6 insertions(+) rename resources/assets/scripts/{bootstrap.js => bootstrap.ts} (91%) diff --git a/resources/assets/scripts/bootstrap.js b/resources/assets/scripts/bootstrap.ts similarity index 91% rename from resources/assets/scripts/bootstrap.js rename to resources/assets/scripts/bootstrap.ts index 35667f59a..26222d0e5 100644 --- a/resources/assets/scripts/bootstrap.js +++ b/resources/assets/scripts/bootstrap.ts @@ -1,5 +1,6 @@ import axios from './helpers/axios'; +// @ts-ignore window._ = require('lodash'); /** @@ -9,9 +10,11 @@ window._ = require('lodash'); */ try { + // @ts-ignore window.$ = window.jQuery = require('jquery'); } catch (e) {} +// @ts-ignore window.axios = axios; /** @@ -23,7 +26,10 @@ window.axios = axios; let token = document.head.querySelector('meta[name="csrf-token"]'); if (token) { + // @ts-ignore window.axios.defaults.headers.common['X-CSRF-TOKEN'] = token.content; + + // @ts-ignore window.X_CSRF_TOKEN = token.content; } else { console.error('CSRF token not found in document.');