laravel / vite-plugin

Laravel plugin for Vite.
MIT License
790 stars 148 forks source link

Use "moduleResolution": "NodeNext" #257

Closed sapphi-red closed 9 months ago

sapphi-red commented 10 months ago

Vite 5 uses Rollup 4 and Rollup 4 now requires "moduleResolution": "NodeNext" or "moduleResolution": "bundler".

I set "type": "module" in package.json to make it work, but I can rename src/index.ts to src/index.mts instead of that. Setting "type": "module" will fix inertia-helpers to be interpreted as CJS too.

timacdonald commented 9 months ago

Thank you so much for dropping by our Laravel world to help us out with the upgrade, @sapphi-red.

We've got a working branch where we have already made the type module changes, thankfully.

I'm going to close this one as we I'm creating a single PR to house all our Vite 5 upgrade work to make it easier for review etc.

Thanks again. We really appreciate the Vite team ❤️

sapphi-red commented 9 months ago

No problem! 😃