Skip to content

Commit

Permalink
run script only uses babel/register when not in production (#4932)
Browse files Browse the repository at this point in the history
  • Loading branch information
daneryl committed Jul 25, 2022
1 parent 59d0342 commit 77afe77
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion scripts/run.js
@@ -1,5 +1,9 @@
/* eslint-disable global-require */
require('dotenv').config();
require('@babel/register')({ extensions: ['.js', '.jsx', '.ts', '.tsx'] });

if (process.env.NODE_ENV !== 'production') {
require('@babel/register')({ extensions: ['.js', '.jsx', '.ts', '.tsx'] });
}

process.env.ROOT_PATH = process.env.ROOT_PATH || __dirname;

Expand Down
1 change: 1 addition & 0 deletions server.js
@@ -1,3 +1,4 @@
/* eslint-disable global-require */
require('dotenv').config();

process.env.ROOT_PATH = process.env.ROOT_PATH || __dirname;
Expand Down

0 comments on commit 77afe77

Please sign in to comment.