babel / babel/minify

Update documentation to allow console lines in development

Open
#934 0 comments 9 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
4.4k
Forks
217
PR merge metrics
No merged PRs in 30d

Description

**Is your feature request related to a problem? Please describe.**
Users are unable to use console log lines in development mode.

**Describe the solution you'd like**
Update the documentation to demostrate how a user can disable console lines only for production builds.

Example `babel.config.js`
```
module.exports = api => {
const babelEnv = api.env();
...
const plugins = [];
if (babelEnv !== 'development') {
plugins.push('transform-remove-console');
}
return {
presets: ['module:metro-react-native-babel-preset'],
plugins,
};
};
```

Contributor guide

Open the contributing guide

Research direction

Locate the documentation covering transform-remove-console and Babel configuration. Add the provided babel.config.js pattern so console lines remain available in development but are removed for production builds, then verify the documentation clearly demonstrates that behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
babel, javascript
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.