Browse Source

Tweak

customisations
alemart 7 months ago
parent
commit
9d41c74c6e
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      esbuild.mjs

+ 1
- 1
esbuild.mjs View File

5
 const argv = process.argv.slice(2);
5
 const argv = process.argv.slice(2);
6
 const json = await readFile(new URL('./package.json', import.meta.url), { encoding: 'utf8' });
6
 const json = await readFile(new URL('./package.json', import.meta.url), { encoding: 'utf8' });
7
 const pack = JSON.parse(json);
7
 const pack = JSON.parse(json);
8
-const production = (pack.version.indexOf('-dev') < 0);
8
+const production = !pack.version.endsWith('-dev');
9
 const minify = (argv.indexOf('--minify') >= 0);
9
 const minify = (argv.indexOf('--minify') >= 0);
10
 const serve = (argv.indexOf('--serve') >= 0);
10
 const serve = (argv.indexOf('--serve') >= 0);
11
 
11
 

Loading…
Cancel
Save