Skip to content

Commit

Permalink
πŸ› Typo env
Browse files Browse the repository at this point in the history
  • Loading branch information
tidurand committed Jul 4, 2024
1 parent e117dd9 commit 8c4bcf4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion builder/esbuild.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as esbuild from 'esbuild';

const BUILD_DIRECTORY = 'dist';
const ENTRY_POINTS = ['src/index.ts'];
const IS_PROD = process.env.BUILD_END === 'prod';
const IS_PROD = process.env.BUILD_ENV === 'prod';
const LIVE_RELOAD = !IS_PROD;
const SERVE_PORT = 3000;
const SERVE_ORIGIN = `http://localhost:${SERVE_PORT}`;
Expand All @@ -21,10 +21,12 @@ const context = await esbuild.context({
});

if (IS_PROD) {
console.log('prod')
await context.rebuild();
context.dispose();
}
else {
console.log('dev')
await context.watch();
await context
.serve({
Expand Down

0 comments on commit 8c4bcf4

Please sign in to comment.