build: use esbuild from aspect rules (#62568)

Use the esbuild ruleset from aspect rules instead of via @bazel/esbuild

PR Close #62568
This commit is contained in:
Joey Perrott
2025-07-09 20:01:30 +00:00
committed by Andrew Kushnir
parent aea0a70c1d
commit 4f1e88e598
15 changed files with 1919 additions and 1638 deletions
+3 -3
View File
@@ -1,6 +1,5 @@
load("@aspect_rules_ts//ts:defs.bzl", rules_js_tsconfig = "ts_config")
load("//tools:defaults.bzl", "esbuild_checked_in")
load("//tools:defaults2.bzl", "ts_project")
load("//tools:defaults2.bzl", "esbuild_checked_in", "ts_project")
package(default_visibility = ["//.github/actions/deploy-docs-site:__subpackages__"])
@@ -10,6 +9,7 @@ exports_files([
esbuild_checked_in(
name = "main",
config = "esbuild.conf.js",
entry_point = ":lib/main.mts",
external = [
"undici",
@@ -18,7 +18,7 @@ esbuild_checked_in(
platform = "node",
target = "node20",
deps = [
":lib",
":lib_rjs",
],
)
@@ -0,0 +1,17 @@
/**
* @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.dev/license
*/
module.exports = {
resolveExtensions: ['.mjs', '.js'],
format: 'esm',
banner: {
// Workaround for: https://github.com/evanw/esbuild/issues/946
js: `import {createRequire as __cjsCompatRequire} from 'module';
const require = __cjsCompatRequire(import.meta.url);`,
},
};
File diff suppressed because it is too large Load Diff