question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add back CJS support

See original GitHub issue

Thanks for the great library!

Would it be possible to add back CJS support? There’s still a lot of tooling that doesn’t support ESM yet.

It wouldn’t have to make the tooling for this library more complicated either; for example we use tsup which makes it super easy to bundle for both CJS & ESM: tsup src/index.ts --format esm,cjs.

Happy to open a PR for this.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
codethewebcommented, May 23, 2022

Yeah, I think v4 will probably work fine for now.

Thank you!

0reactions
bmakuhcommented, May 21, 2022

Hey @codetheweb, sorry for just now responding. Like @chriskrycho my gut instinct is also probably “no,” but on the other hand I’ve been in places before where I’m trying to upgrade something like a webpack plugin that does something funky and relies on some quirk in an older version of Node or something like that. So I hear you when you say that sometimes the ecosystem can lag behind the times in weird ways. Before we go down the road of adding back CJS support, though, I guess one thing I wonder is would it be fine to just stick with True Myth 4 for your use case? True Myth 5 adds some new things but in general it’s not a night and day difference from the last major version—the headline feature mostly was simplifying down to only ESM, haha. My thought is that if TM@4 has suited your needs up until now, would it be possible to hang around on that version until stuff like ts-node or esbuild-register could support monorepos? I only say that getting TM@5 to work with your use case will require a PR either way—a PR to add back CJS support here, or a PR on ts-node or esbuild-register to support monorepos (and the latter PR seems like it would help out other folks in the world too). Thoughts?

Read more comments on GitHub >

github_iconTop Results From Across the Web

facebook/create-react-app - Add support for CJS files - GitHub
If a dependency contains a .cjs file, then said file is not processed by babel due to the default webpack config, meaning it...
Read more >
Support | CJ Affiliate - Commission Junction
The CJ Affiliate Client Support team is dedicated to helping you find the answer you're looking for—whether you're a current client, new to...
Read more >
Back to work in GTA 5| CJ| GTA 5 Real Life Mod| 4K - YouTube
Yacht WX [Addon/FiveM] & Porsche Cayenne Mansory [ Add -on/FiveM] Support Rs Mods https://patreon.com/RsMods?utm_medium.
Read more >
Policies - CJS CD Keys
CJS CD Keys reserves the right to cancel any incoming order which it might believe to be of a suspicious nature (such as...
Read more >
Background Checks - MD Department of Public Safety and
The NGI Record of Arrest and Prosecutions Back (Rap Back) Service is a Federal Bureau of Investigation (FBI) program that allows authorized government...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found