Skip to content

Commit

Permalink
Tweaked server.js to attempt to load from the right path order
Browse files Browse the repository at this point in the history
  • Loading branch information
txau committed Jun 25, 2020
1 parent cac9e62 commit 538022d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion server.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ require.extensions['.scss'] = function scss() {};
require.extensions['.css'] = function css() {};

if (NODE_ENV === 'production') {
require('./prod/app/server.js');
try {
require('./prod/app/server.js');
} catch (err) {
require('./app/server.js');
}
} else {
require('@babel/register')({ extensions: ['.js', '.jsx', '.ts', '.tsx'] });
require('./app/server.js');
Expand Down

0 comments on commit 538022d

Please sign in to comment.