mirror of
https://github.com/Xevion/Pac-Man.git
synced 2026-01-30 22:24:58 -06:00
feat(web): add cache busting with version-based asset loading
- Inject git hash via Vite plugin for cache-busting WASM/JS assets - Enable Emscripten assertions for better runtime error messages - Log Emscripten runtime init for debugging filesystem readiness - Expand dockerignore to exclude web build artifacts
This commit is contained in:
+4
-2
@@ -40,7 +40,7 @@ const os: Os = match(platform())
|
||||
});
|
||||
|
||||
/**
|
||||
* Build the application with Emscripten, generate the CSS, and copy the files into 'dist'.
|
||||
* Build the application with Emscripten and copy the files into 'dist'.
|
||||
*
|
||||
* @param release - Whether to build in release mode.
|
||||
* @param env - The environment variables to inject into build commands.
|
||||
@@ -88,7 +88,7 @@ async function build(release: boolean, env: Record<string, string> | null) {
|
||||
);
|
||||
|
||||
// Copy the files to the dist folder
|
||||
logger.debug("Copying Emscripten build artifacts into web/dist");
|
||||
logger.debug("Copying Emscripten build artifacts into web/public");
|
||||
await Promise.all(
|
||||
files.map(async ({ optional, src, dest }) => {
|
||||
match({ optional, exists: await fs.exists(src) })
|
||||
@@ -109,6 +109,8 @@ async function build(release: boolean, env: Record<string, string> | null) {
|
||||
.otherwise(async () => await fs.copyFile(src, dest));
|
||||
})
|
||||
);
|
||||
|
||||
logger.info("Emscripten build complete");
|
||||
}
|
||||
|
||||
// (Tailwind-related code removed; this script is now focused solely on the Emscripten build)
|
||||
|
||||
Reference in New Issue
Block a user