web
web copied to clipboard
feat: move from CJS to ESM
this is an unreasonably large change which does a few things:
- Moves all packages to
type: "module"
- Removes
node-fetch
(ran into problems in ESM-land) - Replaces all
__dirname
with an equivalent usingimport.meta
- Replaces all
require.resolve
withimport.meta.resolve
- Update all imports to be ESM-compatible
- Move all
tsconfig
to usenodenext
resolution
Probably some other stuff too.
@koddsson if your branch is cleaner, and easier to review etc etc just let me know. im happy to throw this away, it was still a learning experience and i did go upstream to fix a few dependencies we have to make them work in nodenext
.
ah yeah and it'll be outdated, probably a truckload of conflicts but i can update if we want it