fix dev env caching
This commit is contained in:
parent
df39e0fe5d
commit
c17e1375b3
2 changed files with 6 additions and 1 deletions
|
@ -8,7 +8,7 @@
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"analyze": "webpack --mode=none",
|
"analyze": "webpack --mode=none",
|
||||||
"prebuild:dev": "yarn clean && node generate_translations.js",
|
"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",
|
"prebuild:prod": "yarn clean && node generate_translations.js",
|
||||||
"build:prod": "webpack --env COMMIT_HASH=$(git rev-parse --short HEAD) --mode=production",
|
"build:prod": "webpack --env COMMIT_HASH=$(git rev-parse --short HEAD) --mode=production",
|
||||||
"clean": "yarn run rimraf dist",
|
"clean": "yarn run rimraf dist",
|
||||||
|
|
|
@ -27,6 +27,11 @@ export function setCacheControl(
|
||||||
res: Response,
|
res: Response,
|
||||||
next: NextFunction
|
next: NextFunction
|
||||||
) {
|
) {
|
||||||
|
// Avoid setting Cache-Control in development
|
||||||
|
if (process.env.NODE_ENV === "development") {
|
||||||
|
return next();
|
||||||
|
}
|
||||||
|
|
||||||
const user = UserService.Instance;
|
const user = UserService.Instance;
|
||||||
let caching: string;
|
let caching: string;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue