Skip to content

buildTarget is hardcoded and only modifies configuration  #553

@mpsanchis

Description

@mpsanchis

Hi Diego,

Today I noticed two details about the buildTarget option, which imho should be modified for (1) improved understanding and (2) flexibility. These are:

  1. The option called buildTarget is actually only modifying the build target configuration. In the end, you call the NX devkit to run something like nx run my-module:my-build-target:my-configuration, and this parameter only modifies the third part of this string. I would expect that, being named buildTarget, it modifies the my-build-target part, not the my-configuration part.
  2. I see that you have hardcoded the word build in the code. In most of the cases, the build target of projects will be called build, but what if they're not? I am having issues with the nx-devkit right now, because it won't correctly run the target if it depends on other targets. In my case, I have to run something like build-npm-library instead of the standard build, and because this value is hardcoded in this plugin, I can't even modify it by passing it as an option.

I know that changing these is a breaking change, but semantically would make a lot of sense.

Thank you in advance, and congratulations for the great plugin

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions