History log of /openbmc/bmcweb/test/include/webassets_test.cpp (Results 1 – 1 of 1)
Revision Date Author Comments
# 36b5cba2 12-Feb-2026 Jason Westover <jwestover@nvidia.com>

Fix webassets to support Vite build output

The webui-vue project migrated from webpack to Vite, which changes
the output filenames. Vite names entry chunks as index.[hash].js
instead of webpack's a

Fix webassets to support Vite build output

The webui-vue project migrated from webpack to Vite, which changes
the output filenames. Vite names entry chunks as index.[hash].js
instead of webpack's app.[hash].js. The starts_with("index.") check
in addFile() was remapping these JS/CSS files to their parent directory
path (intended only for index.html), causing 404 errors when the
browser requested the actual asset URLs.

Restrict the index file detection to only apply to .html files, so
that index.html is still correctly mapped to "/" while other files
starting with "index." are served at their actual paths.

Also broaden the etag hash detection from hex-only characters to full
alphanumeric to support Vite's base64-style content hashes alongside
webpack's hex hashes.

Add unit tests for getStaticEtag() covering both webpack and Vite hash
formats, path prefixes, edge cases, and validation of hash length and
character constraints.

Tested:
Unit tests pass
Vite-based webui-vue loads and caches etags

Change-Id: I3f7d2e062d0fd8be4ded7889b64a7228b4a6459b
Signed-off-by: Jason Westover <jwestover@nvidia.com>
Signed-off-by: Ed Tanous <etanous@nvidia.com>

show more ...