lepikhinb / momentum-modal

MIT License
442 stars 26 forks source link

Upgrade Inertia to V1.0 makes modals stop working #45

Closed Pedro-Mag closed 1 year ago

Pedro-Mag commented 1 year ago

Upgraded to Inertia V1.0, followed the upgrade guide and everything works fine, except the momentum-modal.

Remember that the Axios version must be the same as Inertia, so upgraded Axios to V1.2.2, first, and after to V1.1.2. Doesn't solve the problem...

No console errors, nothing. The address bar changes to the correct value but nothing more.

Does anyone upgraded successfully to Inertia V1.0?

** Update ** Searched files in node_modules\momentum-modal for references needing update.

in the file momentum-modal.js updated the following lines:

import { usePage as b } from '@inertiajs/vue3'; import { router as E } from "@inertiajs/vue3";

The file momentum-modal.umd.cjs seems a little bit tricky.

Tried the following code: typeof exports == "object" && typeof module < "u" ? t(exports, require("vue"), require("@inertiajs/vue3"), require("@inertiajs/inertia"), require("axios")) : typeof define == "function" && define.amd ? define(["exports", "vue", "@inertiajs/vue3", "@inertiajs/inertia", "axios"], t) : ((o = typeof globalThis < "u" ? globalThis : o || self), t((o["Momentum Modal"] = {}), o.vue, o.inertiaVue3, o.inertia, o.axios));

Still no success...

drehimself commented 1 year ago

You can find the PR (and discussions) for Inertia v1 updates in the JS Repo here: https://github.com/lepikhinb/momentum-modal-plugin/pull/6

I'm patiently waiting myself 😅

lepikhinb commented 1 year ago

The update is coming this week! Thanks for the patience

matthewknill commented 1 year ago

Ah, spent a while trying to figure out why it doesn't work, should've come here first. Cheers @lepikhinb!

oliverbj commented 1 year ago

Ah.. Didn't see it wasn't updated to support v1 yet. Looking forward to the release :) Thanks!

lepikhinb commented 1 year ago

The package has just been updated to support Inertia.js v.1.0. Make sure to update to the latest version.