samrith-s / parcel-plugin-structurize

A plugin to customize the output (dist) directory structure during production.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[πŸ›] Bug: Path to asset gets updated only the first time

NicolasReibnitz opened this issue Β· comments

Describe the bug

This is pretty straightforward: adding the same asset multiple times to an HTML file (for example) results in 404, because the path doesn't get updated globally.

<img src="image.svg" />
<img src="image.svg" />
<img src="image.svg" />

becomes

<img src="assets/image.c9a7e9b8.svg">
<img src="image.c9a7e9b8.svg">
<img src="image.c9a7e9b8.svg">

Error messages

None.

Expected behavior

The resulting index.html file should be updated globally:

<img src="assets/image.c9a7e9b8.svg">
<img src="assets/image.c9a7e9b8.svg">
<img src="assets/image.c9a7e9b8.svg">

Information

  • Package version: v2.4.0
  • Node version: v14.16.0

Additional context

Please find a minimal test case here: https://github.com/NicolasReibnitz/simple-parcel-structure-test.

Hey sorry for this, I will review the PR asap! πŸ˜„