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

Commit

Permalink
Set NODE_ENV to "production". (Significant rendering performance impr…
Browse files Browse the repository at this point in the history
…ovement)
  • Loading branch information
vlad-shatskyi committed May 30, 2016
1 parent d9c5cca commit 44c5d37
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/views/2_SessionComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@ export default class SessionComponent extends React.Component<Props, State> {
if (event.metaKey && event.keyCode === KeyCode.D) {
window.DEBUG = !window.DEBUG;

if (window.DEBUG) {
process.env.NODE_ENV = "development";
} else {
process.env.NODE_ENV = "production";
}

require("devtron").install();

event.stopPropagation();
Expand Down
2 changes: 2 additions & 0 deletions src/views/Main.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
process.env.NODE_ENV = "production";

import Aliases from "../Aliases";
const reactDOM = require("react-dom");
/* tslint:disable:no-unused-variable */
Expand Down

0 comments on commit 44c5d37

Please sign in to comment.