Skip to content
This repository was archived by the owner on May 21, 2019. It is now read-only.

Commit 44c5d37

Browse files
committed
Set NODE_ENV to "production". (Significant rendering performance improvement)
1 parent d9c5cca commit 44c5d37

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/views/2_SessionComponent.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,12 @@ export default class SessionComponent extends React.Component<Props, State> {
7474
if (event.metaKey && event.keyCode === KeyCode.D) {
7575
window.DEBUG = !window.DEBUG;
7676

77+
if (window.DEBUG) {
78+
process.env.NODE_ENV = "development";
79+
} else {
80+
process.env.NODE_ENV = "production";
81+
}
82+
7783
require("devtron").install();
7884

7985
event.stopPropagation();

src/views/Main.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
process.env.NODE_ENV = "production";
2+
13
import Aliases from "../Aliases";
24
const reactDOM = require("react-dom");
35
/* tslint:disable:no-unused-variable */

0 commit comments

Comments
 (0)