From e78a9a613a3be22147859f101f6a56c1af90ee82 Mon Sep 17 00:00:00 2001 From: Alice Pote Date: Tue, 5 Dec 2023 17:03:07 -0500 Subject: [PATCH] chore(esbuild): ensure base esbuild options are set for compiler (#5132) This adds the `getBaseEsbuildOptions` function to the Esbuild configuration for the `compiler/` bundle. This ensures that the following options are set consistently: - [`logLevel`](https://esbuild.github.io/api/#log-level) - [`legalComments`](https://esbuild.github.io/api/#legal-comments) - [`bundle`](https://esbuild.github.io/api/#bundle) This was accidentally omitted from #5027. --- scripts/esbuild/compiler.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/esbuild/compiler.ts b/scripts/esbuild/compiler.ts index 38b914276da..41329212d7d 100644 --- a/scripts/esbuild/compiler.ts +++ b/scripts/esbuild/compiler.ts @@ -10,7 +10,7 @@ import { bundleTypeScriptSource, tsCacheFilePath } from '../bundles/plugins/type import { getBanner } from '../utils/banner'; import { BuildOptions, createReplaceData } from '../utils/options'; import { writePkgJson } from '../utils/write-pkg-json'; -import { getEsbuildAliases, getEsbuildExternalModules, runBuilds } from './util'; +import { getBaseEsbuildOptions, getEsbuildAliases, getEsbuildExternalModules, runBuilds } from './util'; export async function buildCompiler(opts: BuildOptions) { const inputDir = join(opts.buildDir, 'compiler'); @@ -80,11 +80,10 @@ export async function buildCompiler(opts: BuildOptions) { alias['parse5'] = parse5path; const compilerEsbuildOptions: ESBuildOptions = { + ...getBaseEsbuildOptions(), banner: { js: getBanner(opts, 'Stencil Compiler', true) }, entryPoints: [join(srcDir, 'index.ts')], - bundle: true, platform: 'node', - logLevel: 'info', sourcemap: 'linked', external, format: 'cjs',