mirror of
https://github.com/flarum/core.git
synced 2025-08-14 20:34:10 +02:00
Minify each JS file individually, caching the result
This means that the expensive minification process will only be run for a file if it hasn't before. Greatly speeds up extension enabling/disabling. Also: - Don't check file last modification times in production for a bit of extra perf. - Only flush CSS when theme settings are changed. This speeds up the page reload a bit.
This commit is contained in:
@@ -10,9 +10,9 @@
|
||||
|
||||
namespace Flarum\Locale;
|
||||
|
||||
use Flarum\Asset\RevisionCompiler;
|
||||
use Flarum\Asset\JsCompiler as BaseJsCompiler;
|
||||
|
||||
class JsCompiler extends RevisionCompiler
|
||||
class JsCompiler extends BaseJsCompiler
|
||||
{
|
||||
protected $translations = [];
|
||||
|
||||
@@ -36,6 +36,6 @@ class JsCompiler extends RevisionCompiler
|
||||
};
|
||||
});";
|
||||
|
||||
return $output;
|
||||
return $this->format($output);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user