Using [hash] as directory in rollup assetFileNames incompatible with astro:assets #8739
Labels
- P3: minor bug
An edge case that only affects very specific usage (priority)
feat: assets
Related to the Assets feature (scope)
Astro Info
If this issue only occurs in one browser, which browser is a problem?
n/a
Describe the Bug
Configuring
vite.build.rollupOptions.output.assetFileNames
to something like'assets/[hash]/[name][extname]'
and usingImage
fromastro:assets
results in an error during production builds.An example error is:
Configuring
build.assets
doesn't help here (as[hash]
is missing from the path, and you can't add it in usingbuild.assets
).Note:
<img>
elementassetFileNames
for the converted images)The repro is on GitHub as StackBlitz seems to hang during
generating optimized images
.What's the expected result?
This should work, preferably automatically, but failing that with further manual configuration.
Link to Minimal Reproducible Example
https://github.com/reupen/astro-repros
Participation
The text was updated successfully, but these errors were encountered: