Description
When running the dev server, changes to .tmj map files are not picked up by the browser. The map remains stale until the browser cache is manually cleared.
I think, this is caused by the Express static middleware in @workadventure/map-starter-kit-core serving all static files (including .tmj) with maxAge: "1d":
const staticOptions = {
maxAge: "1d",
etag: true,
lastModified: true
};
const staticMiddleware = express.static(".", staticOptions);
The browser caches the TMJ file for 24 hours and never re-requests it from the server, making iterative map development impossible.
Expected behavior
During development, changes to .tmj files should be reflected immediately after a browser reload.
Last working version
I have a repo based on commit c43d94d of the map-starter-kit where this issue does not occur.
Description
When running the dev server, changes to
.tmjmap files are not picked up by the browser. The map remains stale until the browser cache is manually cleared.I think, this is caused by the Express static middleware in
@workadventure/map-starter-kit-coreserving all static files (including.tmj) withmaxAge: "1d":The browser caches the TMJ file for 24 hours and never re-requests it from the server, making iterative map development impossible.
Expected behavior
During development, changes to
.tmjfiles should be reflected immediately after a browser reload.Last working version
I have a repo based on commit
c43d94dof the map-starter-kit where this issue does not occur.