-
Notifications
You must be signed in to change notification settings - Fork 0
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
APP-23022: Define the static variable __DEV__
#163
Conversation
__DEV__
__DEV__
|
||
const helpers = require('../helpers') | ||
const customConfig = require('./webpack.config') | ||
|
||
module.exports = (defaultConfig) => { | ||
let config = merge({}, defaultConfig, customConfig) | ||
|
||
config.plugins.unshift(new webpack.DefinePlugin({ | ||
__DEV__: JSON.stringify(process.env.NODE_ENV !== "production"), |
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.
Why do you need to stringify a Boolean ?
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.
Because I copy-pasted it 😅
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.
Hint: I never use double quotes.
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.
But this results in a string instead of boolean 🤔 Weird...
Drive-by comment: I misinterpreted https://webpack.js.org/plugins/define-plugin/#usage as suggesting that |
Automatically created JIRA issue: APP-23022