fix/esm-build 💎 build config as esm with support to require#287
fix/esm-build 💎 build config as esm with support to require#287MiaInturi wants to merge 1 commit into
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
| banner: { | ||
| js: 'import { createRequire as __mcsCreateRequire } from "node:module"; const require = __mcsCreateRequire(import.meta.url);' | ||
| }, |
There was a problem hiding this comment.
мы собираем esm, но require есть в некоторых пакетах и он вызывается по условию. Ну например только когда функция какая-то вызвана. И т.к. в ESM нет этой глобальной функции, то мы добавляем ее.
Спойлер: prequire('path') по условию вшит в express. Эта строка уйдет после переезда на native
No description provided.