bazel/rules/swc.bzl
def swc_bundle(name, entry, out, **kwargs):
    """Wrapper macro around the swc cli to bundle a folder

    Args:
        name: name
        entry: entry
        out: out
        **kwargs: **kwargs
    """
    args = kwargs.pop("args", [])
    args = [
        # --entry is parsed out by custom tool entry point & not forwarded to the underlying tool cli
        "--entry",
        "%s/%s" % (path_to_workspace_root(), entry),
        # --output is parsed out by custom tool entry point & not forwarded to the underlying tool cli
        "--out-file",
        "%s/$(execpath %s)" % (path_to_workspace_root(), out),
    ] + args

    npm_package_bin(
        name = name,
        outs = [
            out,
            "%s.map" % out,
        ],
        args = args,
        chdir = native.package_name(),
        # Use a custom tool binary which uses a customized entry point
        tool = "//bazel/rules:swcpack-bazel-entry",
        **kwargs
    )
Wrapper macro around the swc cli to bundle a folder

    Args:
        name: name
        entry: entry
        out: out
        **kwargs: **kwargs
    
Wrapper macro around the swc cli to bundle a folder
Wrapper macro around the swc cli to bundle a folder
def swc_bundle(name, entry, out, **kwargs):
    args = kwargs.pop("args", [])
    args = [
        "--entry",
        "%s/%s" % (path_to_workspace_root(), entry),
        "--out-file",
        "%s/$(execpath %s)" % (path_to_workspace_root(), out),
    ] + args
    npm_package_bin(
        name = name,
        outs = [
            out,
            "%s.map" % out,
        ],
        args = args,
        chdir = native.package_name(),
        tool = "//bazel/rules:swcpack-bazel-entry",
        **kwargs
    )
def swc_bundle ( name , entry , out , ** kwargs ) : args = kwargs . pop ( "args" , [ ] ) args = [ "--entry" , "%s/%s" % ( path_to_workspace_root ( ) , entry ) , "--out-file" , "%s/$(execpath %s)" % ( path_to_workspace_root ( ) , out ) , ] + args npm_package_bin ( name = name , outs = [ out , "%s.map" % out , ] , args = args , chdir = native . package_name ( ) , tool = "//bazel/rules:swcpack-bazel-entry" , ** kwargs )
Wrapper macro around the swc cli to bundle a folder
Wrapper macro around the swc cli to bundle a folder
"""Wrapper macro around the swc cli to bundle a folder

    Args:
        name: name
        entry: entry
        out: out
        **kwargs: **kwargs
    """ # --entry is parsed out by custom tool entry point & not forwarded to the underlying tool cli # --output is parsed out by custom tool entry point & not forwarded to the underlying tool cli # Use a custom tool binary which uses a customized entry point
name
None
entry
None
out
None
**kwargs
None