Skip to content

Commit

Permalink
chore(esbuild): ensure base esbuild options are set for compiler (#5132)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
alicewriteswrongs authored Dec 5, 2023
1 parent 9e4e27e commit e78a9a6
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions scripts/esbuild/compiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down Expand Up @@ -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',
Expand Down

0 comments on commit e78a9a6

Please sign in to comment.