ui: deprecate static_url

This commit is contained in:
undefined committed 2022-07-13 18:14:23 +08:00
1 parent a065084b11
commit 60fc805c84
4 files changed
+15 -13

No files matched your search

@@ -134,6 +134,7 @@ nunjucks.runtime.memberLookup = function memberLookup(obj, val) {
};
const env = new Nunjucks();
env.addGlobal('static_url', (assetName) => {
// DEPRECATED
const cdnPrefix = process.env.DEV ? '/' : global.Hydro.model.system.get('server.cdn');
return `${cdnPrefix}${assetName}`;
});