mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-22 12:21:13 +00:00
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": {
|
||||
"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",
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue