eidellev / inertiajs-adonisjs

278 stars 17 forks source link

Support Inertia 1.0 #108

Closed lindgr3n closed 1 year ago

lindgr3n commented 1 year ago

Hi! Is there any plan on updating to support Inertia 1.0?

eidellev commented 1 year ago

Hey @lindgr3n Abosolutely! I'm a bit swamped at the moment, but I am definitely planning to upgrade to Inertia v1.0.

lindgr3n commented 1 year ago

Great 👍 Looking forward to it :)

ralphdas commented 1 year ago

The 1.0 release has a lot of enhancements and there seems no way to check older pre 1.0 documentation of platform specific providers like inertia-react. So staying up to date would be great.

eidellev commented 1 year ago

Done. Starting from v8.0.0 inertiajs-adonisjs will setup inertia for you based on the latest changes in inertia v1.

Important note: it seem the inertia team changed all their packages from CJS to ESM. overall it is a good thing, but this will invetibaly break things for end users so be advised.

ralphdas commented 1 year ago

Great does this mean that we will have to wait for AdonisJS to fully support ESM modules or is it just changing some Webpack Encore settings?

eidellev commented 1 year ago

Most things will probably be resolved by configuring Encore, but SSR will likely break until Adonis support ESM completely (At least as it's currently implemented)

ralphdas commented 1 year ago

Could you give a example/ hint about how to update the config. After updating a codebase I keep on bumping into the fact that the AdonisJS package.json specifies 'commonjs' and now inertiajs/react is ESM, resulting in the expected: "caught ReferenceError: module is not defined"