lumeland / lume

🔥 Static site generator for Deno 🦕
https://lume.land
MIT License
1.76k stars 75 forks source link

When serving, asset paths are not reset after modifying with updateDest #289

Closed valpackett closed 1 year ago

valpackett commented 1 year ago

When running a dev server, something like this:

let cnt = 1

site
  .loadAssets([".css"])
  .process([".css"], (page) => {
    cnt += 1
    page.updateDest({ path: page.dest.path + `.${cnt}` })
  })

keeps modifying the same path string, building up new additions all the time, i.e. like s.2.3.4.5.css:

image

This is not the expected behavior :)

(version 1.12.0)

oscarotero commented 1 year ago

Yes, this is how it works now, but I guess it's not what users expect. I have to think in a way to reset the page data to prevent this incremental changes, without affecting to the performance.

But this may take a while. For now you have to replace the old value with the new.

oscarotero commented 1 year ago

Fixed. It will be available in Lume 1.13.0