Skip to content

[Feature]: Support relative paths in output.path #12100

@chenjiahan

Description

@chenjiahan

What problem does this feature solve?

Currently, Rspack (following webpack) requires output.path to be an absolute path. This restriction can be inconvenient in simple setups where developers naturally write:

output: {
  path: 'dist'
}

Instead of the more verbose:

output: {
  path: path.resolve(__dirname, 'dist')
}

Related PR: #12061

What does the proposed API of configuration look like?

Allow output.path in Rspack config to accept relative paths, and internally normalize them to absolute paths based on context.

Benefits:

  • Improves developer experience
  • Aligns with modern bundler ergonomics

Metadata

Metadata

Assignees

Labels

PR welcometeamThe issue/pr is created by the member of Rspack.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions