@@ -6,17 +6,15 @@ load("@io_bazel_rules_sass//:defs.bzl", _npm_sass_library = "npm_sass_library",
6
6
load ("@npm//@angular/bazel:index.bzl" , _ng_package = "ng_package" )
7
7
load ("@npm//@angular/build-tooling/bazel/integration:index.bzl" , _integration_test = "integration_test" )
8
8
load ("@npm//@angular/build-tooling/bazel/esbuild:index.bzl" , _esbuild = "esbuild" , _esbuild_config = "esbuild_config" )
9
- load ("@npm//@angular/build-tooling/bazel/spec-bundling:index.bzl" , _spec_bundle = "spec_bundle" )
10
9
load ("@npm//@angular/build-tooling/bazel/http-server:index.bzl" , _http_server = "http_server" )
11
10
load ("@npm//@angular/build-tooling/bazel:extract_js_module_output.bzl" , "extract_js_module_output" )
12
11
load ("@npm//@bazel/protractor:index.bzl" , _protractor_web_test_suite = "protractor_web_test_suite" )
13
12
load ("//:packages.bzl" , "NO_STAMP_NPM_PACKAGE_SUBSTITUTIONS" , "NPM_PACKAGE_SUBSTITUTIONS" )
14
13
load ("//:pkg-externals.bzl" , "PKG_EXTERNALS" )
15
14
load ("//tools/markdown-to-html:index.bzl" , _markdown_to_html = "markdown_to_html" )
16
15
load ("//tools/extract-tokens:index.bzl" , _extract_tokens = "extract_tokens" )
17
- load ("//tools/angular:index.bzl" , "LINKER_PROCESSED_FW_PACKAGES" )
18
16
load ("//tools/bazel:ng_package_interop.bzl" , "ng_package_interop" )
19
- load ("//tools:defaults2.bzl" , _karma_web_test_suite = "karma_web_test_suite" )
17
+ load ("//tools:defaults2.bzl" , "spec_bundle" , _karma_web_test_suite = "karma_web_test_suite" )
20
18
21
19
npmPackageSubstitutions = select ({
22
20
"//tools:stamp" : NPM_PACKAGE_SUBSTITUTIONS ,
@@ -145,7 +143,6 @@ def protractor_web_test_suite(name, deps, **kwargs):
145
143
spec_bundle (
146
144
name = "%s_bundle" % name ,
147
145
deps = deps ,
148
- platform = "cjs-legacy" ,
149
146
external = ["protractor" , "selenium-webdriver" ],
150
147
)
151
148
@@ -250,39 +247,6 @@ def ng_web_test_suite(deps = [], static_css = [], exclude_init_script = False, *
250
247
** kwargs
251
248
)
252
249
253
- def spec_bundle (name , deps , ** kwargs ):
254
- # TODO: Rename once devmode and prodmode have been combined.
255
- # For spec bundling we also only consume devmode output as it is ESM in this repository.
256
- # This helps speeding up development experience as ESBuild (used internally by the rule)
257
- # would request both devmode and prodmode output flavor (resulting in 2x TS compilations).
258
- extract_js_module_output (
259
- name = "%s_devmode_deps" % name ,
260
- deps = deps ,
261
- provider = "JSModuleInfo" ,
262
- forward_linker_mappings = True ,
263
- include_external_npm_packages = True ,
264
- include_default_files = False ,
265
- include_declarations = False ,
266
- testonly = True ,
267
- )
268
-
269
- _spec_bundle (
270
- name = name ,
271
- # For specs, we always add the pre-processed linker FW packages so that these
272
- # are resolved instead of the unprocessed FW entry-points through the `node_modules`.
273
- deps = ["%s_devmode_deps" % name ] + LINKER_PROCESSED_FW_PACKAGES ,
274
- workspace_name = "angular_material" ,
275
- run_angular_linker = select ({
276
- # Depending on whether partial compilation is enabled, we may want to run the linker
277
- # to test the Angular compiler linker AOT processing. Additionally, a config setting
278
- # can forcibly disable the linker to ensure tests rely on JIT linking at runtime.
279
- "//tools:force_partial_jit_compilation_enabled" : False ,
280
- "//tools:partial_compilation_enabled" : True ,
281
- "//conditions:default" : False ,
282
- }),
283
- ** kwargs
284
- )
285
-
286
250
# TODO: Rename once devmode and prodmode have been combined.
287
251
def devmode_esbuild (name , deps , testonly = False , ** kwargs ):
288
252
"""Extension of the default `@bazel/esbuild` rule so that only devmode ESM output
0 commit comments