Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable ESM/CJS double import warnings #5744

Closed
wottpal opened this issue Oct 23, 2023 · 3 comments
Closed

Disable ESM/CJS double import warnings #5744

wottpal opened this issue Oct 23, 2023 · 3 comments

Comments

@wottpal
Copy link

wottpal commented Oct 23, 2023

Hey @jacogr,

I'm fully aware of #5636 and don't want to reiterate again on this PITA discussion 馃槄

We have the problem in our project too and they are not bypassable atm. But we are aware and have some refactorings planned that will resolve it, but they will take some time. In the meantime, all these warnings are just so painfully annoying during the development process and we would like to disable those as you suggested here:

Remove the warning about dual usage (it will still occur, but we are basically just "hiding" it)

I would suggest I do a PR to polkadot-js/common introducing a check if an environment variable (e.g. POLKADOT_JS_DISABLE_PACKAGE_WARN) is set. And if yes, it doesn't print anything and skips the tests. This package is used within all other @polkadot/* packages, correct? So this change would be only necessary there.

@jacogr
Copy link
Member

jacogr commented Oct 23, 2023

Sure, PRs welcome.

@jacogr
Copy link
Member

jacogr commented Nov 18, 2023

See polkadot-js/common#1896

@jacogr jacogr closed this as completed Nov 18, 2023
@polkadot-js-bot
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue if you think you have a related problem or query.

@polkadot-js polkadot-js locked as resolved and limited conversation to collaborators Nov 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants