esbuild
Advanced tools
Comparing version 0.3.7 to 0.3.8
@@ -44,6 +44,5 @@ const child_process = require('child_process'); | ||
function pushCommonFlags(flags, options, defaults) { | ||
function pushCommonFlags(flags, options) { | ||
flags.push(`--error-limit=${options.errorLimit || 0}`); | ||
if (options.sourcemap) flags.push(`--sourcemap=${options.sourcemap === true ? defaults.sourcemap : options.sourcemap}`); | ||
if (options.sourcefile) flags.push(`--sourcefile=${options.sourcefile}`); | ||
@@ -74,4 +73,5 @@ if (options.target) flags.push(`--target=${options.target}`); | ||
const flags = []; | ||
pushCommonFlags(flags, options, { sourcemap: true }); | ||
pushCommonFlags(flags, options); | ||
if (options.sourcemap) flags.push(`--sourcemap${options.sourcemap === true ? '' : `=${options.sourcemap}`}`); | ||
if (options.name) flags.push(`--name=${options.name}`); | ||
@@ -273,3 +273,4 @@ if (options.bundle) flags.push('--bundle'); | ||
const flags = ['build', `/${name}`, file, '--', name, '--outfile=/output.js']; | ||
pushCommonFlags(flags, options, { sourcemap: 'external' }); | ||
pushCommonFlags(flags, options); | ||
if (options.sourcemap) flags.push(`--sourcemap${options.sourcemap === true ? '=external' : `=${options.sourcemap}`}`); | ||
if (options.loader) flags.push(`--loader:.${loader}=${options.loader}`); | ||
@@ -276,0 +277,0 @@ const response = await sendRequest(flags); |
{ | ||
"name": "esbuild", | ||
"version": "0.3.7", | ||
"version": "0.3.8", | ||
"description": "An extremely fast JavaScript bundler and minifier.", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/evanw/esbuild", |
19394
434
3