Skip to content

fix: do not enable debug features on npm start#549

Merged
dergigi merged 3 commits intomasterfrom
dev-mode
Oct 26, 2022
Merged

fix: do not enable debug features on npm start#549
dergigi merged 3 commits intomasterfrom
dev-mode

Conversation

@theborakompanioni
Copy link
Collaborator

Resolves #548.

Before this PR, starting Jam with npm start enabled debug features.
After this PR, npm start will behave like if a user built the app with npm build and debug features are disabled.

This means a developer must switch to using npm run dev:start in order to enable debug features.
If a dev still uses npm start the app will behave "as if on mainnet" - debug features are disabled.

This is a compromise and making a dev change his behaviour feels better than making an ordinary user start Jam in a different way.

@theborakompanioni theborakompanioni added the concept Wild idea, or too many details unknown yet label Oct 20, 2022
@theborakompanioni theborakompanioni self-assigned this Oct 20, 2022
@theborakompanioni theborakompanioni marked this pull request as ready for review October 20, 2022 10:33
Copy link
Contributor

@dergigi dergigi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean and simple solution, well done! 👏

tACK ✅

}

const devMode = process.env.NODE_ENV === 'development'
const devMode = process.env.NODE_ENV === 'development' && process.env.REACT_APP_JAM_DEV_MODE === 'true'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

"serve": "14.0.1"
},
"scripts": {
"dev:start": "REACT_APP_JAM_DEV_MODE=true npm start",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice and simple, I like it 👍

@dergigi dergigi merged commit fda77c2 into master Oct 26, 2022
@dergigi dergigi deleted the dev-mode branch October 26, 2022 13:11
@dergigi dergigi added documentation Improvements or additions to documentation devtools Improvements in tooling and removed concept Wild idea, or too many details unknown yet labels Oct 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

devtools Improvements in tooling documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: default to "mainnet" settings on npm start

2 participants