Skip to content

[Bug]: Output path template [fullhash] not replaced with hash string #11940

@lohmatiy-lapa

Description

@lohmatiy-lapa

System Info

System:
OS: Windows 11 10.0.26200
CPU: (8) x64 Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
Memory: 7.33 GB / 15.89 GB
Binaries:
Node: 22.17.1 - C:\Program Files\nodejs\node.EXE
npm: 10.9.3 - C:\Program Files\nodejs\npm.CMD
pnpm: 10.15.1 - C:\Users\lapa\AppData\Local\pnpm\pnpm.CMD
Browsers:
Chrome: 141.0.7390.108
Edge: Chromium (141.0.3537.57)
Internet Explorer: 11.0.26100.1882
npmPackages:
@rspack/cli: ^1.5.2 => 1.5.2
@rspack/core: ^1.5.2 => 1.5.2

Details

Acording to the rspack docs it is able to use [fullhash] template in output.path. But actually this template not replaced with compilation hash and assets emitting to rspack-dist/__[fullhash]__. In webpack this template works correct. Also note, that in js part when using compilation.getPath(compilation.compiler.outputPath) from plugins this template replacement works correctly.

Reproduce link

https://github.com/lohmatiy-lapa/rspack-output-path-template

Reproduce Steps

  1. Run pnpm run build.
  2. See output of plugin in console.
  3. Check real assets output in rspack-dist folder.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions