front/SvelteViewEngine: don't use css cache in development environment

This commit is contained in:
Alice Gaudon 2021-11-25 00:25:29 +01:00
parent 179cb09b58
commit c606379bcd
1 changed files with 1 additions and 1 deletions

View File

@ -139,7 +139,7 @@ export default class SvelteViewEngine extends ViewEngine {
// Get dependencies css
const dependenciesCss: string[] = [];
for (const dependency of this.resolveAndCacheDependencies(code, canonicalName)) {
if (this.cssCache[dependency] === undefined) {
if (this.cssCache[dependency] === undefined || !config.get<boolean>('view.cache')) {
await this.renderSvelteSsr(dependency, locals);
}
const css = this.cssCache[dependency];