bazel/rules/swc.bzl
def swc_minify(name, src, out, swcrc, **kwargs):
    """Wrapper macro around the swc cli to minify a bundle

    Args:
        name: name
        src: src
        out: out
        swcrc: swcrc
        **kwargs: **kwargs
    """
    args = kwargs.pop("args", [])
    args = [
        "$(execpath %s)" % src,
        "--no-swcrc",
        "--source-maps",
        "--config-file",
        "$(execpath %s)" % swcrc,
        "--out-file",
        "$(execpath %s)" % out,
    ] + args
    data = kwargs.pop("data", [])
    data.append(swcrc)

    _swc(
        name = name,
        outs = [
            out,
            "%s.map" % out,
        ],
        args = args,
        data = data,
        **kwargs
    )
Wrapper macro around the swc cli to minify a bundle

    Args:
        name: name
        src: src
        out: out
        swcrc: swcrc
        **kwargs: **kwargs
    
Wrapper macro around the swc cli to minify a bundle
Wrapper macro around the swc cli to minify a bundle
def swc_minify(name, src, out, swcrc, **kwargs):
    args = kwargs.pop("args", [])
    args = [
        "$(execpath %s)" % src,
        "--no-swcrc",
        "--source-maps",
        "--config-file",
        "$(execpath %s)" % swcrc,
        "--out-file",
        "$(execpath %s)" % out,
    ] + args
    data = kwargs.pop("data", [])
    data.append(swcrc)
    _swc(
        name = name,
        outs = [
            out,
            "%s.map" % out,
        ],
        args = args,
        data = data,
        **kwargs
    )
def swc_minify ( name , src , out , swcrc , ** kwargs ) : args = kwargs . pop ( "args" , [ ] ) args = [ "$(execpath %s)" % src , "--no-swcrc" , "--source-maps" , "--config-file" , "$(execpath %s)" % swcrc , "--out-file" , "$(execpath %s)" % out , ] + args data = kwargs . pop ( "data" , [ ] ) data . append ( swcrc ) _swc ( name = name , outs = [ out , "%s.map" % out , ] , args = args , data = data , ** kwargs )
Wrapper macro around the swc cli to minify a bundle
Wrapper macro around the swc cli to minify a bundle
"""Wrapper macro around the swc cli to minify a bundle

    Args:
        name: name
        src: src
        out: out
        swcrc: swcrc
        **kwargs: **kwargs
    """
name
None
src
None
out
None
swcrc
None
**kwargs
None