Skip to content

Configurable artifact output path (output.distPath) landed in #296 #297

Description

@ScriptedAlchemy

PR #296 (merge df52dc7) landed config-level artifact output support:

export default defineConfig({
  plugin: { ... },
  output: { distPath: 'artifact' }, // default 'dist'; CLI --output still wins
});
  • Naming follows Rsbuild/Rslib output.distPath (string shorthand only).
  • Values must be project-root-contained relative POSIX paths; AB4707/AB4708/AB4709 cover malformed shapes, root escapes/absolute paths, and reserved namespaces (.agent-bundle, .git, node_modules, src). Absolute paths stay a per-invocation CLI concern since the config is a hashed, portable release-identity input.
  • The value is carried on PreparedProject.artifactDistPath (never the normalized model, so modelDigest stays location-independent) and feeds build/prepack, inspect, source-snapshot exclusion, the dev watcher ignore set, and the Workbench host-discovery doctor drift source that previously hardcoded <root>/dist.

Deliberately deferred, revisit only with real demand:

  • per-asset-type distPath subdirs and output.filename templates (host-pack internals are framework-owned and content-addressed; no user-meaningful naming knobs exist)
  • output.assetPrefix (artifacts are filesystem-installed, never URL-served)
  • output.cleanDistPath

Docs: framework-mode config reference + diagnostics registry updated; scaffold templates carry a commented hint.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions