Skip to content

Commit

Permalink
fix: 还原g_getAssets
Browse files Browse the repository at this point in the history
  • Loading branch information
奇风 committed Oct 10, 2023
1 parent d1a6e33 commit e9ced7f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/preset-umi/templates/server.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ export function createHistory(opts) {
return createClientHistory(opts);
}

// TODO: remove global variable
global.g_getAssets = (fileName) => {
let m = typeof manifest === 'function' ? manifest() : manifest;
return m.assets[fileName];
};
const manifest = {{{ env }}} === 'development' ? getManifest : getManifest();
const createOpts = {
routesWithServerLoader,
PluginManager,
Expand Down

0 comments on commit e9ced7f

Please sign in to comment.