Logo
Explore Help
Sign In
studio/cunningham
2
0
Fork 0
You've already forked cunningham
Code Issues Pull Requests Actions Packages Projects Releases Wiki Activity
Files
ef4ece39b488bbf4b9c0b2691e0701557a2991dd
cunningham/.changeset/dry-maps-speak.md

6 lines
64 B
Markdown
Raw Normal View History

✨(react) add support for CJS At first we wanted to only support ESM. But as we want to share types and export design tokens from the react package to the outside world in order to allow local cunningham.ts files to import them, we are forced to also build the library for CJS too. Why? Because local cunningham.ts files are loaded as CJS, so they can only import CJS module. Why loading cunningham.ts as CJS? Because the tokens package's binary is built for CJS, then it's seamless to make it load CJS, where making it load ESM was buggy. And why not migrate the tokens package to ESM so? Because it implies to rewrite every imports with .js extensions, makes us loose the possibility to use __dirname kind of variables. And also Jest use for testing is not compliant at all when it comes to execute ESM code. Well, the ecosystem is not ready for that at the moment, sadly.
2023-05-23 15:09:21 +02:00
---
"@openfun/cunningham-react": minor
---
add support for CJS
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.25.4 Page: 39ms Template: 2ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API