Skip to content

Commit

Permalink
use bundle.js when in dev
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanHirsch committed Feb 20, 2020
1 parent 3d8dc2e commit 6e37016
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ const app = express();

if (process.env.NODE_ENV === 'dev') require('dotenv').config();

const jsBundle = readdirSync('assets').find(f => f.endsWith('bundle.js'));
const jsBundle =
process.env.NODE_ENV === 'dev'
? 'bundle.js'
: readdirSync('assets').find(f => f.endsWith('bundle.js'));

const fileCache = new Map();
const MIME_TYPES = Object.entries({
css: 'text/css',
Expand Down

0 comments on commit 6e37016

Please sign in to comment.