sourcegraph/dev/webpack.bzl
Quinn Slack cbac3c6390
remove more ENTERPRISE=1 remnants (#57232)
There are still many places that build the old non-enterprise bundle. This is no longer needed or maintained. This change simplifies our builds by removing that unnecessary target. There are still some remnants (such as `ui/assets/{enterprise,oss}`); not *all* are removed here.
2023-10-02 10:43:11 -07:00

28 lines
829 B
Python

load("@aspect_rules_webpack//webpack:defs.bzl", _webpack_bundle = "webpack_bundle")
load("@aspect_bazel_lib//lib:copy_to_directory.bzl", "copy_to_directory")
def webpack_bundle(name, **kwargs):
_webpack_bundle(
name = name,
webpack = "//dev:webpack",
**kwargs
)
def webpack_web_app(name, **kwargs):
bundle_name = "%s_bundle" % name
_webpack_bundle(
name = bundle_name,
webpack = "//dev:webpack",
**kwargs
)
copy_to_directory(
name = name,
# flatten static assets
# https://docs.aspect.build/rules/aspect_bazel_lib/docs/copy_to_directory/#root_paths
root_paths = ["ui/assets", "client/web/%s" % bundle_name],
srcs = ["//ui/assets/img:img", ":%s" % bundle_name],
visibility = ["//visibility:public"],
)