发布

  • feat(bundling): add excludeFromExternal option to esbuild executor (#32980)

    frostbyte_neo 发布于 2025-10-30 13:33:21 +00:00

    This PR adds an option to allow users to include certain third-party
    deps in the bundle by specifying the excludeFromExternal option. There
    is an existing thirdParty: true option that Nx Console uses to bundle
    all third-party deps in the bundle, but the new option is more
    granular.

    Current Behavior

    Nx automatically detects certain dependencies (like optional peer
    dependencies) and marks them as external. Users have no way to override
    this behavior when they want to bundle these packages instead.

    Expected Behavior

    Users can specify an excludeFromExternal option to exclude specific
    packages from the external list, allowing them to be bundled even if Nx
    automatically detected them as external.

    Related Issue(s)

    Closes #NXC-2532


    Co-authored-by: Claude noreply@anthropic.com
    Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
    Co-authored-by: nx-cloud[bot] <71083854+nx-cloud[bot]@users.noreply.github.com>

    下载附件