diff --git a/packages/preset-umi/templates/server.tpl b/packages/preset-umi/templates/server.tpl index 44e6a28d48f0..13be23d98838 100644 --- a/packages/preset-umi/templates/server.tpl +++ b/packages/preset-umi/templates/server.tpl @@ -37,10 +37,9 @@ export function createHistory(opts) { // TODO: remove global variable global.g_getAssets = (fileName) => { - let m = typeof manifest === 'function' ? manifest() : manifest; + let m = getManifest(); return m.assets[fileName]; }; -const manifest = {{{ env }}} === 'development' ? getManifest : getManifest(); const createOpts = { routesWithServerLoader, PluginManager,