diff options
author | Chocobozzz <me@florianbigard.com> | 2022-07-06 15:44:14 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-07-06 16:12:17 +0200 |
commit | 9452d4fd3321148fb80b64a67bd9983fee6c208e (patch) | |
tree | 62ad9be8d3f4bfcf63196274ad4b736372c05f2c /server/lib/client-html.ts | |
parent | 630d0a1bf5897fff203cb07e426223f55dcc882d (diff) | |
download | PeerTube-9452d4fd3321148fb80b64a67bd9983fee6c208e.tar.gz PeerTube-9452d4fd3321148fb80b64a67bd9983fee6c208e.tar.zst PeerTube-9452d4fd3321148fb80b64a67bd9983fee6c208e.zip |
/!\ Use a dedicated config file for development
It means you have to replace NODE_ENV=test to NODE_ENV=dev if you use it
npm run dev:* commands are already updated
Diffstat (limited to 'server/lib/client-html.ts')
-rw-r--r-- | server/lib/client-html.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/lib/client-html.ts b/server/lib/client-html.ts index 1e8d03023..899d80c15 100644 --- a/server/lib/client-html.ts +++ b/server/lib/client-html.ts | |||
@@ -2,6 +2,7 @@ import express from 'express' | |||
2 | import { readFile } from 'fs-extra' | 2 | import { readFile } from 'fs-extra' |
3 | import { join } from 'path' | 3 | import { join } from 'path' |
4 | import validator from 'validator' | 4 | import validator from 'validator' |
5 | import { isTestOrDevInstance } from '@server/helpers/core-utils' | ||
5 | import { toCompleteUUID } from '@server/helpers/custom-validators/misc' | 6 | import { toCompleteUUID } from '@server/helpers/custom-validators/misc' |
6 | import { mdToOneLinePlainText } from '@server/helpers/markdown' | 7 | import { mdToOneLinePlainText } from '@server/helpers/markdown' |
7 | import { ActorImageModel } from '@server/models/actor/actor-image' | 8 | import { ActorImageModel } from '@server/models/actor/actor-image' |
@@ -30,7 +31,6 @@ import { MAccountActor, MChannelActor } from '../types/models' | |||
30 | import { getActivityStreamDuration } from './activitypub/activity' | 31 | import { getActivityStreamDuration } from './activitypub/activity' |
31 | import { getBiggestActorImage } from './actor-image' | 32 | import { getBiggestActorImage } from './actor-image' |
32 | import { ServerConfigManager } from './server-config-manager' | 33 | import { ServerConfigManager } from './server-config-manager' |
33 | import { isTestInstance } from '@server/helpers/core-utils' | ||
34 | 34 | ||
35 | type Tags = { | 35 | type Tags = { |
36 | ogType: string | 36 | ogType: string |
@@ -234,7 +234,7 @@ class ClientHtml { | |||
234 | const path = ClientHtml.getEmbedPath() | 234 | const path = ClientHtml.getEmbedPath() |
235 | 235 | ||
236 | // Disable HTML cache in dev mode because webpack can regenerate JS files | 236 | // Disable HTML cache in dev mode because webpack can regenerate JS files |
237 | if (!isTestInstance() && ClientHtml.htmlCache[path]) { | 237 | if (!isTestOrDevInstance() && ClientHtml.htmlCache[path]) { |
238 | return ClientHtml.htmlCache[path] | 238 | return ClientHtml.htmlCache[path] |
239 | } | 239 | } |
240 | 240 | ||