mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 17:51:57 +00:00
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.
28 lines
829 B
Python
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"],
|
|
)
|