Skip to content

Commit

Permalink
Revert "fix: expand make variables properly when passed via args (#140)…
Browse files Browse the repository at this point in the history
…" (#144)

This reverts commit a962156.
  • Loading branch information
jbedard authored Mar 22, 2024
1 parent a962156 commit ca06ab9
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 21 deletions.
11 changes: 0 additions & 11 deletions e2e/smoke/src/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,10 @@ webpack_bundle(
node_modules = "//v5:node_modules",
)

# Validates that args are properly expanded when
# a format string is passed
entryPointFile = 'entry-point.js'
webpack_bundle(
name = "bundle-entry-args-v5",
args = ['--entry', '$(rootpath {})'.format(entryPointFile)],
srcs = ["entry-point.js"],
node_modules = "//v5:node_modules",
)

write_source_files(
name = "bundles",
files = {
"expected-v4.js_": ":bundle-v4.js",
"expected-v5.js_": ":bundle-v5.js",
"expected-v5.js_": ":bundle-entry-args-v5.js",
},
)
3 changes: 0 additions & 3 deletions e2e/smoke/src/entry-point.js

This file was deleted.

8 changes: 1 addition & 7 deletions webpack/private/webpack_bundle.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -121,13 +121,7 @@ def _impl(ctx):
])

# Add user specified arguments after rule supplied arguments
args.add_all([
" ".join([
expand_variables(ctx, exp, attribute_name = "args")
for exp in expand_locations(ctx, arg, entry_points_srcs + ctx.attr.srcs + ctx.attr.deps + ctx.attr.data).split(" ")
])
for arg in ctx.attr.args
])
args.add_all(ctx.attr.args)

executable = ctx.executable.webpack_exec_cfg
execution_requirements = {}
Expand Down

0 comments on commit ca06ab9

Please sign in to comment.