vite-plugin-node
vite-plugin-node copied to clipboard
chore: upgrade dependencies / migrate to ESM
trafficstars
Based on https://github.com/axe-me/vite-plugin-node/pull/112, I took it a bit further.
Since I wasn't directly able to get everything to work locally, I did some rework and applied the following changes:
- Tweaked the
tsconfigsetup a bit with some of the recommendation from this cheat sheet and this article - Migrated the whole source code to ESM - I had to update a lot of imports to make it fully compatible with the ESM format which requires extensions in the transpiled output
- Upgraded to Node 18 and ES2022
- Upgraded to TypeScript 5.6
- Fixed remaining issues with missing dev dependencies and other TypeScript errors
- Upgraded the Nest example project to Nest 10 and replaced Jest with Vitest
I also tested all the example projects and they seem to work fine. All that now remains is to publish a new version to NPM.