Skip to content
This repository has been archived by the owner on Dec 16, 2021. It is now read-only.

Fix DEV always being false in webpack #504

Merged
merged 1 commit into from
Aug 31, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ const CAMEL_PROPS = /^(?:accent|alignment|arabic|baseline|cap|clip|color|fill|fl
const BYPASS_HOOK = {};

/*global process*/
const DEV = typeof process !== 'undefined' && process.env && process.env.NODE_ENV!=='production';
let DEV = false;
try {
DEV = process.env.NODE_ENV!=='production';
}
catch (e) {}

// a component that renders nothing. Used to replace components for unmountComponentAtNode.
function EmptyComponent() { return null; }
Expand Down