Skip to content

fix/esm-build 💎 build config as esm with support to require#287

Open
MiaInturi wants to merge 1 commit into
mainfrom
fix/esm-build
Open

fix/esm-build 💎 build config as esm with support to require#287
MiaInturi wants to merge 1 commit into
mainfrom
fix/esm-build

Conversation

@MiaInturi

Copy link
Copy Markdown
Collaborator

No description provided.

@coderabbitai

coderabbitai Bot commented Jun 8, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 6ec2f331-951d-4c67-84e7-cf05ef60fb9d

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/esm-build

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Comment on lines +28 to +30
banner: {
js: 'import { createRequire as __mcsCreateRequire } from "node:module"; const require = __mcsCreateRequire(import.meta.url);'
},

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

мы собираем esm, но require есть в некоторых пакетах и он вызывается по условию. Ну например только когда функция какая-то вызвана. И т.к. в ESM нет этой глобальной функции, то мы добавляем ее.

Спойлер: prequire('path') по условию вшит в express. Эта строка уйдет после переезда на native

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant