fix dev env caching

This commit is contained in:
Alec Armbruster 2023-06-29 16:27:28 -04:00
parent df39e0fe5d
commit c17e1375b3
No known key found for this signature in database
GPG key ID: 52BC7C84E960FD1B
2 changed files with 6 additions and 1 deletions

View file

@ -8,7 +8,7 @@
"scripts": {
"analyze": "webpack --mode=none",
"prebuild:dev": "yarn clean && node generate_translations.js",
"build:dev": "webpack --env COMMIT_HASH=$(git rev-parse --short HEAD) --mode=development",
"build:dev": "webpack --env COMMIT_HASH=$(git rev-parse --short HEAD) NODE_ENV=development --mode=development",
"prebuild:prod": "yarn clean && node generate_translations.js",
"build:prod": "webpack --env COMMIT_HASH=$(git rev-parse --short HEAD) --mode=production",
"clean": "yarn run rimraf dist",

View file

@ -27,6 +27,11 @@ export function setCacheControl(
res: Response,
next: NextFunction
) {
// Avoid setting Cache-Control in development
if (process.env.NODE_ENV === "development") {
return next();
}
const user = UserService.Instance;
let caching: string;