minor tweaks to how JS is set up
This commit is contained in:
@ -1,14 +1,15 @@
|
||||
require("./bootstrap");
|
||||
|
||||
import { createApp, h } from "vue";
|
||||
import { createInertiaApp } from "@inertiajs/inertia-vue3";
|
||||
import { InertiaProgress } from "@inertiajs/progress";
|
||||
import Notifications from "notiwind";
|
||||
import { createApp, h } from 'vue';
|
||||
import { createInertiaApp } from '@inertiajs/inertia-vue3';
|
||||
import { InertiaProgress } from '@inertiajs/progress';
|
||||
import { ZiggyVue } from '../../vendor/tightenco/ziggy/dist/vue.m';
|
||||
import Notifications from 'notiwind';
|
||||
|
||||
const appName = window.document.getElementsByTagName("title")[0]?.innerText || "Laravel";
|
||||
const appName = window.document.getElementsByTagName('title')[0]?.innerText || 'Laravel';
|
||||
|
||||
window.genUid = function () {
|
||||
return [...Array(16)].map(() => Math.floor(Math.random() * 16).toString(16)).join("");
|
||||
return [...Array(16)].map(() => Math.floor(Math.random() * 16).toString(16)).join('');
|
||||
};
|
||||
|
||||
createInertiaApp({
|
||||
@ -18,6 +19,7 @@ createInertiaApp({
|
||||
return createApp({ render: () => h(app, props) })
|
||||
.use(plugin)
|
||||
.use(Notifications)
|
||||
.use(ZiggyVue, Ziggy)
|
||||
.mixin({ methods: { route } })
|
||||
.mount(el);
|
||||
},
|
||||
|
6
src/resources/js/bootstrap.js
vendored
6
src/resources/js/bootstrap.js
vendored
@ -23,5 +23,9 @@ window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
|
||||
// broadcaster: 'pusher',
|
||||
// key: process.env.MIX_PUSHER_APP_KEY,
|
||||
// cluster: process.env.MIX_PUSHER_APP_CLUSTER,
|
||||
// forceTLS: true
|
||||
// wsHost: import.meta.env.MIX_PUSHER_HOST ?? `ws-${import.meta.env.MIX_PUSHER_CLUSTER}.pusher.com`,
|
||||
// wsPort: import.meta.env.MIX_PUSHER_PORT ?? 80,
|
||||
// wssPort: import.meta.env.MIX_PUSHER_PORT ?? 443,
|
||||
// forceTLS: (import.meta.env.MIX_PUSHER_SCHEME ?? 'https') === 'https',
|
||||
// enabledTransports: ['ws', 'wss'],
|
||||
// });
|
||||
|
Reference in New Issue
Block a user