cool-easter-32542
05/06/2023, 11:17 AMpackage_json(scripts=[node_build_script(...), ...]) be used with the pants package goal.
Currently, node_build_script(...) only works as codegen to produce resource (to be able to bundle its output in a pex_binary).
The docker backend only includes package:able artifacts and files. This means that node_build_script outputs cannot be directly included in a docker build.
Describe the solution you'd like
Implement package goal for node_build_script.
Describe alternatives you've considered
1. Produce files from the node_build_script. This incompatible with pex_binary.
2. Add another symbol for a node_package_script. I think this is unecessary, since a target that can both be a packaged output and codegened sources works without problematic interactions.
Additional context
Relevant slack thread+msg https://pantsbuild.slack.com/archives/C01SPQQ2WK1/p1683134409544149?thread_ts=1682521466.317359&cid=C01SPQQ2WK1
Repro where the issue is prevalent:
https://github.com/theoribeiro/pants-pnpm
pantsbuild/pantscool-easter-32542
05/11/2023, 3:44 PM