We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
In example:
var definePlugin = new webpack.DefinePlugin({ __DEV__: JSON.stringify(JSON.parse(process.env.BUILD_DEV || 'true')), __PRERELEASE__: JSON.stringify(JSON.parse(process.env.BUILD_PRERELEASE || 'false')) });
__DEV__ always be true even i BUILD_DEV is undefined.
__DEV__
BUILD_DEV
JSON.stringify(JSON.parse(process.env.BUILD_DEV || 'true')) => 'true'
JSON.stringify(JSON.parse(process.env.BUILD_DEV || 'true'))
'true'
maybe we should update this example to make __DEV__ return true only when BUILD_DEV exist.
for example:
JSON.stringify(typeof(process.env.BUILD_DEV) !== undefined)
The text was updated successfully, but these errors were encountered:
I also noticed this when reading through the README.
Sorry, something went wrong.
No branches or pull requests
In example:
__DEV__
always be true even iBUILD_DEV
is undefined.JSON.stringify(JSON.parse(process.env.BUILD_DEV || 'true'))
=>'true'
maybe we should update this example to make
__DEV__
return true only whenBUILD_DEV
exist.for example:
The text was updated successfully, but these errors were encountered: