I have browsed a lot of questions in this space, but I haven't found a clear answer.
I recently updated many of my project's npm dependencies to their latest. The project is entirely built around commonJS and most of the npm modules it includes use commonJS. However, a few (like chalk) now use ES syntax. Surprisingly I haven't found a reasonable way of including those modules.
Since I can apparently use import to load commonJS modules I guess I can change all the require statements to import, presumably having to use dynamic import for the few places where I'm using require dynamically. Is this the only solution? Seems silly to have to change the entire structure to support a few npm modules.