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

define WP_ENVIRONMENT_TYPE: 'local' in playground #58

Merged
merged 1 commit into from
Sep 25, 2024

Conversation

ashfame
Copy link
Member

@ashfame ashfame commented Sep 25, 2024

Required to expose dev tooling's UI in WP admin.

@psrpinto @akirk

This works for now, but before releasing the extension, I think we would need a different value for WP_ENVIRONMENT_TYPE or it not be defined since default value is production, so that dev tooling UI is not exposed to the user. Perhaps a different set of steps for prod build, if we have the need?

I can create a new issue to track this, if we all agree that this UI should not be exposed to the end user.

@ashfame ashfame self-assigned this Sep 25, 2024
@psrpinto
Copy link
Member

I think it would make sense to, in the future, have a isDev (or similar) somewhere in the frontend code, that can be set through the build tooling (not sure how we would do this). Then we can modify the behaviour of the code according to the value of isDev, e.g. expose or not expose window.trywp, or set the value of WP_ENVIRONMENT_TYPE.

@ashfame ashfame merged commit 579ee3c into trunk Sep 25, 2024
3 checks passed
@ashfame ashfame deleted the playground_local_env_constant branch September 25, 2024 12:18
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.

2 participants