Sandbox javascript build further
postgresql was failing to find configuration, add it to the sandbox.
When building JS, we were getting the following error:
[!] RollupError: Node tried to load your configuration file as CommonJS
even though it is likely an ES module. To resolve this, change the
extension of your configuration to ".mjs", set "type": "module" in your
package.json file or pass the "--bundleConfigAsCjs" flag.
Rename the configuration to be mjs to make it happy, and fix other leaks
found at the same time.
Change-Id: I59d8f9624b349ff5b27a6eeed8923f8d13d56744
Signed-off-by: Austin Schuh <austin.linux@gmail.com>
diff --git a/tools/build_rules/js/BUILD b/tools/build_rules/js/BUILD
index 86a0288..4221b05 100644
--- a/tools/build_rules/js/BUILD
+++ b/tools/build_rules/js/BUILD
@@ -1,5 +1,6 @@
load("@npm//:@angular/compiler-cli/package_json.bzl", angular_compiler_cli = "bin")
load(":ts.bzl", "ts_project")
+load("@aspect_bazel_lib//lib:copy_file.bzl", "copy_file")
exports_files([
"cypress.config.js",
@@ -16,7 +17,6 @@
name = "ngc.esbuild",
srcs = ["ngc.esbuild.ts"],
tsconfig = "//:tsconfig.node",
- visibility = ["//visibility:public"],
deps = [
"//:node_modules/@angular/compiler-cli",
"//:node_modules/@babel/core",
@@ -25,6 +25,13 @@
],
)
+copy_file(
+ name = "ngc_esbuild_js_copy",
+ src = ":ngc.esbuild.js",
+ out = "ngc.esbuild.mjs",
+ visibility = ["//visibility:public"],
+)
+
py_binary(
name = "assemble_service_worker_files",
srcs = [