-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Add React Developers Tools #1410
Conversation
a65eed3
to
c03850e
Compare
* The dependency is not bundled to the production build. | ||
*/ | ||
export const installDeveloperTools = async () => { | ||
if (process.env.NODE_ENV === 'development') { |
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.
isDevelopment
variable is available in common/vars.ts
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.
If we use the environment variable through a variable assignment, then webpack can't optimize the build. In other words if isDevelopment
is used, the code inside the if branch is included in the production build. However it appears the dependency itself (electron-devtools-installer
) is excluded in both cases, but I'd still keep using process.env directly to make sure future changes will exclude the code too.
I tested the branch locally, the React developer tools is working fine, not sure why the integration failed https://dev.azure.com/lensapp/lensapp/_build/results?buildId=3499&view=logs&j=93056758-5bfb-5750-f113-e720ddefdb4c&t=39774cca-89df-5118-1dfb-4fca56fe47ed&l=994 |
d349645
to
6d7028c
Compare
Signed-off-by: Panu Horsmalahti <phorsmalahti@mirantis.com>
6d7028c
to
e92db33
Compare
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.
LGTM
Add React Developers Tools to the Electron app for debugging purposes.