This repository has been archived by the owner on Dec 1, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
'__DEV__' is not defined #3
Labels
Comments
This is how I added
|
Did you eject from create-react-app? |
No |
RichardLindhout
added
help wanted
Extra attention is needed
question
Further information is requested
labels
Oct 6, 2020
Hmm, not sure let's keep it open! |
Similar idea... In const findWebpackPlugin = (plugins, pluginName) =>
plugins.find((plugin) => plugin.constructor.name === pluginName);
const overrideDefinePlugin = () => (config) => {
const plugin = findWebpackPlugin(config.plugins, 'DefinePlugin');
plugin.definitions.__DEV__ = config.mode === 'development';
return config;
};
module.exports = override(
// ...
overrideDefinePlugin(),
// ...
); |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
How to define
__DEV__
inconfig-overrides
usingcustomize-cra
? Thanks.The text was updated successfully, but these errors were encountered: