-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
feat(devtools): ability to change ports and domains in devtools server #6185
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… env prefix per project type
🦋 Changeset detectedLatest commit: d143f0e The changes in this PR will be included in the next version bump. This PR includes changesets to release 7 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Passing run #11348 ↗︎
Details:
Review all test suite changes for PR #6185 ↗︎ |
BatuhanW
requested changes
Jul 29, 2024
BatuhanW
reviewed
Jul 30, 2024
Co-authored-by: Batuhan Wilhelm <[email protected]>
Co-authored-by: Batuhan Wilhelm <[email protected]>
Co-authored-by: Batuhan Wilhelm <[email protected]>
BatuhanW
approved these changes
Jul 30, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great stuff. ❤️
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Checklist
Please check if your PR fulfills the following requirements:
Bugs / Features
Changes
fix(cli): avoid polluting
process.env
with unwanted environment variablesPreviously, the
@refinedev/cli
useddotenv
to load environment variables from.env
files and populateprocess.env
. This caused issues when the users app has a different convention for environment variables, e.g..env.development
,.env.production
, etc.Now, the
@refinedev/cli
will read the file but avoid populatingprocess.env
with the variables and keep the values in its scope without passing them to the child processes. This will prevent unwanted environment variables from being passed to the child processes and avoid conflicts with the user's environment variables.Resolves #5803
feat(devtools): ability to change the port of the devtools server
Now users can change the port of the devtools server by setting the
REFINE_DEVTOOLS_PORT
environment variable. Previously, the port was hardcoded to "5001" and could not be changed.If you're using
@refinedev/cli
's runner commands to start your development server,REFINE_DEVTOOLS_PORT
will be propagated to your app with appropriate prefix. E.g. if you're using Vite, the environment variable will beVITE_REFINE_DEVTOOLS_PORT
and it will be used by the@refinedev/devtools
's<DevtoolsProvider />
component to connect to the devtools server.NEXT_PUBLIC_
REACT_APP_
In some scenarios where the environment variables are not passed to the browser, you may need to manually set the Refine Devtools URL in the
<DevtoolsProvider />
component via theurl
prop. Remix apps do not automatically pass environment variables to the browser, so you will need to set the URL manually. If not set, the default URL will be used.While the port can be changed, this feature also allows users to host the devtools server on a different machine or domain and provide the
<DevtoolsProvider />
with the custom domain URL. This such case will be useful if you're dockerizing your app and devtools server separately.Enterprise Edition: Refine Devtools running on ports other than "5001" is only available in the Enterprise Edition. If you're using the Community Edition, Refine Devtools will not work if the port is changed.
Resolves #5111