load("@build_bazel_rules_nodejs//:index.bzl", "nodejs_binary") load("//tools:defaults.bzl", "ts_library") package(default_visibility = ["//visibility:public"]) exports_files(["launcher_template.sh"]) ts_library( name = "dev-server_lib", srcs = [ "dev-server.ts", "ibazel.ts", "main.ts", ], # TODO(ESM): remove this once the Bazel NodeJS rules can handle ESM with `nodejs_binary`. devmode_module = "commonjs", deps = [ "@npm//@types/browser-sync", "@npm//@types/minimist", "@npm//@types/node", "@npm//@types/send", "@npm//browser-sync", "@npm//minimist", "@npm//send", ], ) nodejs_binary( name = "dev-server_bin", data = [ ":dev-server_lib", ], entry_point = ":main.ts", # TODO(josephperrott): update dependency usages to no longer need bazel patch module resolver # See: https://github.com/bazelbuild/rules_nodejs/wiki#--bazel_patch_module_resolver-now-defaults-to-false-2324 templated_args = ["--bazel_patch_module_resolver"], )