Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 2 additions & 9 deletions packages/cli/scripts/esbuild-utils.mts
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,9 @@ const logger = getDefaultLogger()
* @param {Object} options - Configuration options
* @param {string} options.entryPoint - Path to entry point file
* @param {string} options.outfile - Path to output file
* @param {boolean} [options.minify=false] - Whether to minify output
* @returns {Object} esbuild configuration object
*/
export function createIndexConfig({ entryPoint, minify = false, outfile }: { entryPoint: string; minify?: boolean; outfile: string }) {
export function createIndexConfig({ entryPoint, outfile }: { entryPoint: string; outfile: string }) {
// Get inlined environment variables for build-time constant replacement.
const inlinedEnvVars = getInlinedEnvVars()

Expand All @@ -34,6 +33,7 @@ export function createIndexConfig({ entryPoint, minify = false, outfile }: { ent
bundle: true,
entryPoints: [entryPoint],
format: 'cjs',
minify: false,
outfile,
platform: 'node',
// Source maps off for entry point production build.
Expand All @@ -50,13 +50,6 @@ export function createIndexConfig({ entryPoint, minify = false, outfile }: { ent
write: false,
}

if (minify) {
config.minify = true
} else {
config.minifyWhitespace = true
config.minifyIdentifiers = true
}

return config
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ const cliPath = path.resolve(__dirname, '../../cli')
const config = createIndexConfig({
entryPoint: path.join(cliPath, 'src', 'index.mts'),
outfile: path.join(rootPath, 'dist', 'index.js'),
minify: false,
})

if (fileURLToPath(import.meta.url) === process.argv[1]) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ const cliPath = path.resolve(__dirname, '../../cli')
const config = createIndexConfig({
entryPoint: path.join(cliPath, 'src', 'index.mts'),
outfile: path.join(rootPath, 'dist', 'index.js'),
minify: false,
})

if (fileURLToPath(import.meta.url) === process.argv[1]) {
Expand Down