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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

httpDetailsExtensions does not respect the if configuration #4945

Closed
3 tasks
madorb opened this issue Dec 16, 2022 · 2 comments
Closed
3 tasks

httpDetailsExtensions does not respect the if configuration #4945

madorb opened this issue Dec 16, 2022 · 2 comments

Comments

@madorb
Copy link
Contributor

madorb commented Dec 16, 2022

Issue workflow progress

Progress of the issue based on the Contributor Workflow

Make sure to fork this template and run yarn generate in the terminal.

Please make sure Mesh package versions under package.json matches yours.

  • 2. A failing test has been provided
  • 3. A local solution has been provided
  • 4. A pull request is pending review

Describe the bug

As per the documentation it appears that the http-details-extension should evaluate and respect the result of its if option. This doesn't appear to be the case, as no matter what I put into the if it is always enabled.

plugins:
 - httpDetailsExtensions:
 if: "env.NODE_ENV === 'someimpossiblevalue'"

To Reproduce
Steps to reproduce the behavior:

Configure the plugin as per the documentation and attempt to disable it using the if.

(Hopefully this works, i'm a java developer just dipping me feet in, and i find these online editors really obtuse)
https://codesandbox.io/s/trusting-feistel-t5wljl

Expected behavior

If the if evaluates to false, the extension does not output.

Environment:

  • OS: macos
  • NodeJS: 16
@omarabid
Copy link

Confirming the issue too. I thought I was doing something wrong :/

@ardatan
Copy link
Owner

ardatan commented Mar 29, 2023

It has been fixed in the recent versions!

@ardatan ardatan closed this as completed Mar 29, 2023
This was referenced Apr 30, 2024
This was referenced May 7, 2024
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

No branches or pull requests

3 participants