Files
Jack Westbrook 036c878843 Plugins: Improve frontend loader cache (#87488)
* do it

* set empty child version to parent version

* feat(plugins): use pluginId for loader cache keys

* feat(plugins): apply caching to all js and css files systemjs loads

* remove old code and add comment

* test(plugins): update systemjs hooks tests in line with better caching

* test(plugins): wip - comment out failing backend loader tests

* fix tests and improve comment

* Update public/app/features/plugins/loader/cache.test.ts

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>

---------

Co-authored-by: Will Browne <will.browne@grafana.com>
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
2024-06-07 10:03:41 +02:00

5 lines
239 B
TypeScript

export const SHARED_DEPENDENCY_PREFIX = 'package';
export const LOAD_PLUGIN_CSS_REGEX = /^plugins.+\.css$/i;
export const JS_CONTENT_TYPE_REGEX = /^(text|application)\/(x-)?javascript(;|$)/;
export const CACHE_INITIALISED_AT = Date.now();