Pomax / lib-font

This library adds a new Font() object to the JavaScript toolbox, similar to new Image() for images

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Supports CommonJS

yisibl opened this issue · comments

A lot of historical Node.js projects won't be able to migrate to ESM anytime soon, and I think it would be better to support CommonJS.

All of them are perfectly capable of converting ESM to CJS themselves using quite a few tool options. If your project is stuck on CJS, it's not the job of your dependencies to stay stuck with you, you'll have to add the tools to pull modern code back into the past yourself.

Thanks, I've forked and released a separate package containing CJS: yisibl#1

the license certain allows for that, but it's kind of a nonsense thing to do given the JS tools available to everyone in late 2023 to fix this problem if your codebase has a CJS/ESM problem.