angular/devtools/tools/esbuild/esbuild-spec.config.mjs
AleksanderBodurri 3a688cb5ec build(devtools): fix issue where esbuild configs were not being set properly in DevTools (#48762)
Previously, a createConfig helper function was created to consolidate common esbuild configurations for DevTools. This function is asynchronous, but when it was used to set the configuration in various esbuild config files, it was used as if it was synchronous.

This commit fixes this issue by wrapping the output of the function in await, so that it propagates the configurations to esbuild correctly.

PR Close #48762
2023-01-18 10:45:13 -08:00

16 lines
537 B
JavaScript

/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import createConfig from './esbuild-base.config.mjs';
export default {
...(await createConfig({enableLinker: true, optimize: false})),
// Use the `iife` format for the test entry-point as tests should run immediately.
// For browser tests which are wrapped in an AMD header and footer, this works as well.
format: 'iife',
};