1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2025-02-23 14:57:46 +01:00

feat(deps): Upgrade all'ultima versione di InertiaJS

This commit is contained in:
Maicol Battistini 2021-08-02 13:13:02 +02:00
parent 2f00ffac63
commit c3fdf89101
No known key found for this signature in database
GPG Key ID: 4FDB0F87CDB1D34A
2 changed files with 12 additions and 8 deletions

View File

@ -12,9 +12,9 @@
"production": "mix --production"
},
"dependencies": {
"@inertiajs/inertia": "^0.1.9",
"@tebe/inertia-mithril": "^0",
"mithril": "^2"
"@inertiajs/inertia": "^0.10.0",
"@maicol07/inertia-mithril": "^0.3.3",
"mithril": "^2.0.4"
},
"devDependencies": {
"@babel/cli": "^7",

14
resources/js/app.js vendored
View File

@ -1,9 +1,13 @@
import m from 'mithril';
import {InertiaApp} from '@tebe/inertia-mithril';
import {createInertiaApp} from '@maicol07/inertia-mithril';
const app = document.getElementById('app');
InertiaApp.initialPage = JSON.parse(app.dataset.page);
InertiaApp.resolveComponent = async (name) => (await import(`./Views/${name}`)).default;
m.mount(app, InertiaApp);
// noinspection JSIgnoredPromiseFromCall
createInertiaApp({
title: (title) => `${title} - OpenStaManager`,
resolve: async (name) => import(`./Views/${name}`),
setup({ el, app }) {
m.mount(el, app);
},
});