jsonresume / resume-cli

CLI tool to easily setup a new resume 📑
https://jsonresume.org
MIT License
4.56k stars 385 forks source link

fix: support themes exporting ESM modules #675

Closed theoludwig closed 2 years ago

theoludwig commented 2 years ago

Hey! :wave:

This PR allows supporting custom themes exporting ESM modules. Currently, we require the theme, so it throws this kind of error:

Error [ERR_REQUIRE_ESM]: require() of ES Module /home/divlo/Documents/Divlo/jsonresume-theme-custom/index.js from /home/divlo/Documents/Divlo/node_modules/resume-cli/build/render-html.js not supported.

This PR fixes this, thanks to using Dynamic imports.

Note: This is a BREAKING CHANGE because we need to use Node.js >= v12.20.0 to support dynamic imports, which should not be too dramatic as Node.js v10 is End Of Life.

theoludwig commented 2 years ago

Friendly ping :smile: cc @thomasdavis

theoludwig commented 2 years ago

This PR has no recent activity, and probably won't be merged for a long time and as I don't want/have time to do the job for this PR, I decided to close it.

Feel free to open another PR yourself based on this one if you want this to be implemented.