forked from Gitlink/forgeplus-react
build
This commit is contained in:
parent
c8a08bbd7f
commit
db9bfa7576
|
@ -695,7 +695,7 @@
|
||||||
},
|
},
|
||||||
"abbrev": {
|
"abbrev": {
|
||||||
"version": "1.1.1",
|
"version": "1.1.1",
|
||||||
"resolved": "http://173.15.15.82:8081/repository/npm-all/abbrev/-/abbrev-1.1.1.tgz",
|
"resolved": "https://registry.npmmirror.com/abbrev/-/abbrev-1.1.1.tgz",
|
||||||
"integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==",
|
"integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
@ -7471,7 +7471,7 @@
|
||||||
},
|
},
|
||||||
"fstream": {
|
"fstream": {
|
||||||
"version": "1.0.12",
|
"version": "1.0.12",
|
||||||
"resolved": "http://173.15.15.82:8081/repository/npm-all/fstream/-/fstream-1.0.12.tgz",
|
"resolved": "https://registry.npmmirror.com/fstream/-/fstream-1.0.12.tgz",
|
||||||
"integrity": "sha512-WvJ193OHa0GHPEL+AycEJgxvBEwyfRkN1vhjca23OaPVMCaLCXTd5qAu82AjTcgP1UJmytkOKb63Ypde7raDIg==",
|
"integrity": "sha512-WvJ193OHa0GHPEL+AycEJgxvBEwyfRkN1vhjca23OaPVMCaLCXTd5qAu82AjTcgP1UJmytkOKb63Ypde7raDIg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
|
@ -7531,7 +7531,7 @@
|
||||||
},
|
},
|
||||||
"gaze": {
|
"gaze": {
|
||||||
"version": "1.1.3",
|
"version": "1.1.3",
|
||||||
"resolved": "http://173.15.15.82:8081/repository/npm-all/gaze/-/gaze-1.1.3.tgz",
|
"resolved": "https://registry.npmmirror.com/gaze/-/gaze-1.1.3.tgz",
|
||||||
"integrity": "sha512-BRdNm8hbWzFzWHERTrejLqwHDfS4GibPoq5wjTPIoJHoBtKGPg3xAFfxmM+9ztbXelxcf2hwQcaz1PtmFeue8g==",
|
"integrity": "sha512-BRdNm8hbWzFzWHERTrejLqwHDfS4GibPoq5wjTPIoJHoBtKGPg3xAFfxmM+9ztbXelxcf2hwQcaz1PtmFeue8g==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
|
@ -8679,7 +8679,7 @@
|
||||||
},
|
},
|
||||||
"in-publish": {
|
"in-publish": {
|
||||||
"version": "2.0.1",
|
"version": "2.0.1",
|
||||||
"resolved": "http://173.15.15.82:8081/repository/npm-all/in-publish/-/in-publish-2.0.1.tgz",
|
"resolved": "https://registry.npmmirror.com/in-publish/-/in-publish-2.0.1.tgz",
|
||||||
"integrity": "sha512-oDM0kUSNFC31ShNxHKUyfZKy8ZeXZBWMjMdZHKLOk13uvT27VTL/QzRGfRUcevJhpkZAvlhPYuXkF7eNWrtyxQ==",
|
"integrity": "sha512-oDM0kUSNFC31ShNxHKUyfZKy8ZeXZBWMjMdZHKLOk13uvT27VTL/QzRGfRUcevJhpkZAvlhPYuXkF7eNWrtyxQ==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
@ -10848,7 +10848,7 @@
|
||||||
},
|
},
|
||||||
"node-gyp": {
|
"node-gyp": {
|
||||||
"version": "3.8.0",
|
"version": "3.8.0",
|
||||||
"resolved": "http://173.15.15.82:8081/repository/npm-all/node-gyp/-/node-gyp-3.8.0.tgz",
|
"resolved": "https://registry.npmmirror.com/node-gyp/-/node-gyp-3.8.0.tgz",
|
||||||
"integrity": "sha512-3g8lYefrRRzvGeSowdJKAKyks8oUpLEd/DyPV4eMhVlhJ0aNaZqIrNUIPuEWWTAoPqyFkfGrM67MC69baqn6vA==",
|
"integrity": "sha512-3g8lYefrRRzvGeSowdJKAKyks8oUpLEd/DyPV4eMhVlhJ0aNaZqIrNUIPuEWWTAoPqyFkfGrM67MC69baqn6vA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
|
@ -11042,7 +11042,7 @@
|
||||||
},
|
},
|
||||||
"npmlog": {
|
"npmlog": {
|
||||||
"version": "4.1.2",
|
"version": "4.1.2",
|
||||||
"resolved": "http://173.15.15.82:8081/repository/npm-all/npmlog/-/npmlog-4.1.2.tgz",
|
"resolved": "https://registry.npmmirror.com/npmlog/-/npmlog-4.1.2.tgz",
|
||||||
"integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==",
|
"integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
|
@ -11350,7 +11350,7 @@
|
||||||
},
|
},
|
||||||
"osenv": {
|
"osenv": {
|
||||||
"version": "0.1.5",
|
"version": "0.1.5",
|
||||||
"resolved": "http://173.15.15.82:8081/repository/npm-all/osenv/-/osenv-0.1.5.tgz",
|
"resolved": "https://registry.npmmirror.com/osenv/-/osenv-0.1.5.tgz",
|
||||||
"integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==",
|
"integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
|
@ -17226,7 +17226,7 @@
|
||||||
},
|
},
|
||||||
"stdout-stream": {
|
"stdout-stream": {
|
||||||
"version": "1.4.1",
|
"version": "1.4.1",
|
||||||
"resolved": "http://173.15.15.82:8081/repository/npm-all/stdout-stream/-/stdout-stream-1.4.1.tgz",
|
"resolved": "https://registry.npmmirror.com/stdout-stream/-/stdout-stream-1.4.1.tgz",
|
||||||
"integrity": "sha512-j4emi03KXqJWcIeF8eIXkjMFN1Cmb8gUlDYGeBALLPo5qdyTfA9bOtl8m33lRoC+vFMkP3gl0WsDr6+gzxbbTA==",
|
"integrity": "sha512-j4emi03KXqJWcIeF8eIXkjMFN1Cmb8gUlDYGeBALLPo5qdyTfA9bOtl8m33lRoC+vFMkP3gl0WsDr6+gzxbbTA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
|
@ -17772,7 +17772,7 @@
|
||||||
},
|
},
|
||||||
"tar": {
|
"tar": {
|
||||||
"version": "2.2.2",
|
"version": "2.2.2",
|
||||||
"resolved": "http://173.15.15.82:8081/repository/npm-all/tar/-/tar-2.2.2.tgz",
|
"resolved": "https://registry.npmmirror.com/tar/-/tar-2.2.2.tgz",
|
||||||
"integrity": "sha512-FCEhQ/4rE1zYv9rYXJw/msRqsnmlje5jHP6huWeBZ704jUTy02c5AZyWujpMR1ax6mVw9NyJMfuK2CMDWVIfgA==",
|
"integrity": "sha512-FCEhQ/4rE1zYv9rYXJw/msRqsnmlje5jHP6huWeBZ704jUTy02c5AZyWujpMR1ax6mVw9NyJMfuK2CMDWVIfgA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
|
@ -18179,7 +18179,7 @@
|
||||||
},
|
},
|
||||||
"true-case-path": {
|
"true-case-path": {
|
||||||
"version": "1.0.3",
|
"version": "1.0.3",
|
||||||
"resolved": "http://173.15.15.82:8081/repository/npm-all/true-case-path/-/true-case-path-1.0.3.tgz",
|
"resolved": "https://registry.npmmirror.com/true-case-path/-/true-case-path-1.0.3.tgz",
|
||||||
"integrity": "sha512-m6s2OdQe5wgpFMC+pAJ+q9djG82O2jcHPOI6RNg1yy9rCYR+WD6Nbpl32fDpfC56nirdRy+opFa/Vk7HYhqaew==",
|
"integrity": "sha512-m6s2OdQe5wgpFMC+pAJ+q9djG82O2jcHPOI6RNg1yy9rCYR+WD6Nbpl32fDpfC56nirdRy+opFa/Vk7HYhqaew==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
|
|
|
@ -1,51 +0,0 @@
|
||||||
// @ts-nocheck
|
|
||||||
|
|
||||||
if (window.g_initWebpackHotDevClient) {
|
|
||||||
function tryApplyUpdates(onHotUpdateSuccess?: Function) {
|
|
||||||
// @ts-ignore
|
|
||||||
if (!module.hot) {
|
|
||||||
window.location.reload();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
function isUpdateAvailable() {
|
|
||||||
// @ts-ignore
|
|
||||||
return window.g_getMostRecentCompilationHash() !== __webpack_hash__;
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO: is update available?
|
|
||||||
// @ts-ignore
|
|
||||||
if (!isUpdateAvailable() || module.hot.status() !== 'idle') {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
function handleApplyUpdates(err: Error | null, updatedModules: any) {
|
|
||||||
if (err || !updatedModules || window.g_getHadRuntimeError()) {
|
|
||||||
window.location.reload();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
onHotUpdateSuccess?.();
|
|
||||||
|
|
||||||
if (isUpdateAvailable()) {
|
|
||||||
// While we were updating, there was a new update! Do it again.
|
|
||||||
tryApplyUpdates();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// @ts-ignore
|
|
||||||
module.hot.check(true).then(
|
|
||||||
function (updatedModules: any) {
|
|
||||||
handleApplyUpdates(null, updatedModules);
|
|
||||||
},
|
|
||||||
function (err: Error) {
|
|
||||||
handleApplyUpdates(err, null);
|
|
||||||
},
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
window.g_initWebpackHotDevClient({
|
|
||||||
tryApplyUpdates,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,26 +0,0 @@
|
||||||
// @ts-nocheck
|
|
||||||
import { createBrowserHistory } from '/Users/caishi/forgeplus-react/node_modules/@umijs/runtime';
|
|
||||||
|
|
||||||
let options = {
|
|
||||||
"basename": "/"
|
|
||||||
};
|
|
||||||
if ((<any>window).routerBase) {
|
|
||||||
options.basename = (<any>window).routerBase;
|
|
||||||
}
|
|
||||||
|
|
||||||
// remove initial history because of ssr
|
|
||||||
let history: any = process.env.__IS_SERVER ? null : createBrowserHistory(options);
|
|
||||||
export const createHistory = (hotReload = false) => {
|
|
||||||
if (!hotReload) {
|
|
||||||
history = createBrowserHistory(options);
|
|
||||||
}
|
|
||||||
|
|
||||||
return history;
|
|
||||||
};
|
|
||||||
|
|
||||||
// 通常仅微前端场景需要调用这个 API
|
|
||||||
export const setCreateHistoryOptions = (newOpts: any = {}) => {
|
|
||||||
options = { ...options, ...newOpts };
|
|
||||||
};
|
|
||||||
|
|
||||||
export { history };
|
|
|
@ -1,8 +0,0 @@
|
||||||
// @ts-nocheck
|
|
||||||
import { Plugin } from '/Users/caishi/forgeplus-react/node_modules/@umijs/runtime';
|
|
||||||
|
|
||||||
const plugin = new Plugin({
|
|
||||||
validKeys: ['modifyClientRenderOpts','patchRoutes','rootContainer','render','onRouteChange',],
|
|
||||||
});
|
|
||||||
|
|
||||||
export { plugin };
|
|
|
@ -1,180 +0,0 @@
|
||||||
/** Created by Umi Plugin **/
|
|
||||||
|
|
||||||
export interface IConfigFromPlugins {
|
|
||||||
routes?: {
|
|
||||||
/**
|
|
||||||
* Any valid URL path
|
|
||||||
*/
|
|
||||||
path?: string;
|
|
||||||
/**
|
|
||||||
* A React component to render only when the location matches.
|
|
||||||
*/
|
|
||||||
component?: string | (() => any);
|
|
||||||
wrappers?: string[];
|
|
||||||
/**
|
|
||||||
* navigate to a new location
|
|
||||||
*/
|
|
||||||
redirect?: string;
|
|
||||||
/**
|
|
||||||
* When true, the active class/style will only be applied if the location is matched exactly.
|
|
||||||
*/
|
|
||||||
exact?: boolean;
|
|
||||||
routes?: any[];
|
|
||||||
[k: string]: any;
|
|
||||||
}[];
|
|
||||||
history?: {
|
|
||||||
type?: "browser" | "hash" | "memory";
|
|
||||||
options?: {};
|
|
||||||
};
|
|
||||||
polyfill?: {
|
|
||||||
imports?: string[];
|
|
||||||
};
|
|
||||||
alias?: {};
|
|
||||||
analyze?: {
|
|
||||||
analyzerMode?: "server" | "static" | "disabled";
|
|
||||||
analyzerHost?: string;
|
|
||||||
analyzerPort?: any;
|
|
||||||
openAnalyzer?: boolean;
|
|
||||||
generateStatsFile?: boolean;
|
|
||||||
statsFilename?: string;
|
|
||||||
logLevel?: "info" | "warn" | "error" | "silent";
|
|
||||||
defaultSizes?: "stat" | "parsed" | "gzip";
|
|
||||||
[k: string]: any;
|
|
||||||
};
|
|
||||||
/**
|
|
||||||
* postcss autoprefixer, default flexbox: no-2009
|
|
||||||
*/
|
|
||||||
autoprefixer?: {};
|
|
||||||
base?: string;
|
|
||||||
chainWebpack?: () => any;
|
|
||||||
chunks?: string[];
|
|
||||||
/**
|
|
||||||
* more css-loader options see https://webpack.js.org/loaders/css-loader/#options
|
|
||||||
*/
|
|
||||||
cssLoader?: {
|
|
||||||
url?: boolean | (() => any);
|
|
||||||
import?: boolean | (() => any);
|
|
||||||
modules?: boolean | string | {};
|
|
||||||
sourceMap?: boolean;
|
|
||||||
importLoaders?: number;
|
|
||||||
onlyLocals?: boolean;
|
|
||||||
esModule?: boolean;
|
|
||||||
localsConvention?: "asIs" | "camelCase" | "camelCaseOnly" | "dashes" | "dashesOnly";
|
|
||||||
};
|
|
||||||
cssModulesTypescriptLoader?: {
|
|
||||||
mode?: "emit" | "verify";
|
|
||||||
};
|
|
||||||
cssnano?: {};
|
|
||||||
copy?: string[];
|
|
||||||
define?: {};
|
|
||||||
devScripts?: {};
|
|
||||||
/**
|
|
||||||
* devServer configs
|
|
||||||
*/
|
|
||||||
devServer?: {
|
|
||||||
/**
|
|
||||||
* devServer port, default 8000
|
|
||||||
*/
|
|
||||||
port?: number;
|
|
||||||
host?: string;
|
|
||||||
https?:
|
|
||||||
| {
|
|
||||||
key?: string;
|
|
||||||
cert?: string;
|
|
||||||
[k: string]: any;
|
|
||||||
}
|
|
||||||
| boolean;
|
|
||||||
headers?: {};
|
|
||||||
writeToDisk?: boolean | (() => any);
|
|
||||||
[k: string]: any;
|
|
||||||
};
|
|
||||||
devtool?: string;
|
|
||||||
/**
|
|
||||||
* Code splitting for performance optimization
|
|
||||||
*/
|
|
||||||
dynamicImport?: {
|
|
||||||
/**
|
|
||||||
* loading the component before loaded
|
|
||||||
*/
|
|
||||||
loading?: string;
|
|
||||||
};
|
|
||||||
exportStatic?: {
|
|
||||||
htmlSuffix?: boolean;
|
|
||||||
dynamicRoot?: boolean;
|
|
||||||
/**
|
|
||||||
* extra render paths only enable in ssr
|
|
||||||
*/
|
|
||||||
extraRoutePaths?: () => any;
|
|
||||||
};
|
|
||||||
externals?: {} | string | (() => any);
|
|
||||||
extraBabelPlugins?: any[];
|
|
||||||
extraBabelPresets?: any[];
|
|
||||||
extraPostCSSPlugins?: any[];
|
|
||||||
/**
|
|
||||||
* fork-ts-checker-webpack-plugin options see https://github.com/TypeStrong/fork-ts-checker-webpack-plugin#options
|
|
||||||
*/
|
|
||||||
forkTSChecker?: {
|
|
||||||
async?: boolean;
|
|
||||||
typescript?: boolean | {};
|
|
||||||
eslint?: {};
|
|
||||||
issue?: {};
|
|
||||||
formatter?: string | {};
|
|
||||||
logger?: {};
|
|
||||||
[k: string]: any;
|
|
||||||
};
|
|
||||||
hash?: boolean;
|
|
||||||
ignoreMomentLocale?: boolean;
|
|
||||||
inlineLimit?: number;
|
|
||||||
lessLoader?: {};
|
|
||||||
manifest?: {
|
|
||||||
fileName?: string;
|
|
||||||
publicPath?: "";
|
|
||||||
basePath?: string;
|
|
||||||
writeToFileEmit?: boolean;
|
|
||||||
};
|
|
||||||
mountElementId?: "";
|
|
||||||
mpa?: {};
|
|
||||||
nodeModulesTransform?: {
|
|
||||||
type?: "all" | "none";
|
|
||||||
exclude?: string[];
|
|
||||||
};
|
|
||||||
outputPath?: "";
|
|
||||||
plugins?: string[];
|
|
||||||
postcssLoader?: {};
|
|
||||||
presets?: string[];
|
|
||||||
proxy?: {};
|
|
||||||
publicPath?: string;
|
|
||||||
runtimePublicPath?: boolean;
|
|
||||||
ssr?: {
|
|
||||||
/**
|
|
||||||
* remove window.g_initialProps in html, to force execing Page getInitialProps functions
|
|
||||||
*/
|
|
||||||
forceInitial?: boolean;
|
|
||||||
/**
|
|
||||||
* disable serve-side render in umi dev mode.
|
|
||||||
*/
|
|
||||||
devServerRender?: boolean;
|
|
||||||
mode?: "stream" | "string";
|
|
||||||
/**
|
|
||||||
* static markup in static site
|
|
||||||
*/
|
|
||||||
staticMarkup?: boolean;
|
|
||||||
};
|
|
||||||
singular?: boolean;
|
|
||||||
styleLoader?: {};
|
|
||||||
targets?: {};
|
|
||||||
terserOptions?: {};
|
|
||||||
theme?: {};
|
|
||||||
runtimeHistory?: {};
|
|
||||||
favicon?: string;
|
|
||||||
headScripts?: any[];
|
|
||||||
links?: any[];
|
|
||||||
metas?: any[];
|
|
||||||
scripts?: any[];
|
|
||||||
styles?: any[];
|
|
||||||
title?: string;
|
|
||||||
mock?: {
|
|
||||||
exclude?: string[];
|
|
||||||
};
|
|
||||||
[k: string]: any;
|
|
||||||
}
|
|
|
@ -1,8 +0,0 @@
|
||||||
// @ts-nocheck
|
|
||||||
import { plugin } from './plugin';
|
|
||||||
import * as Plugin_0 from '/Users/caishi/forgeplus-react/src/app.js';
|
|
||||||
|
|
||||||
plugin.register({
|
|
||||||
apply: Plugin_0,
|
|
||||||
path: '/Users/caishi/forgeplus-react/src/app.js',
|
|
||||||
});
|
|
|
@ -1,3 +0,0 @@
|
||||||
// @ts-nocheck
|
|
||||||
import 'core-js';
|
|
||||||
import 'regenerator-runtime/runtime';
|
|
|
@ -1,16 +0,0 @@
|
||||||
// @ts-nocheck
|
|
||||||
import { ApplyPluginsType } from '/Users/caishi/forgeplus-react/node_modules/@umijs/runtime';
|
|
||||||
import { plugin } from './plugin';
|
|
||||||
|
|
||||||
export function getRoutes() {
|
|
||||||
const routes = [];
|
|
||||||
|
|
||||||
// allow user to extend routes
|
|
||||||
plugin.applyPlugins({
|
|
||||||
key: 'patchRoutes',
|
|
||||||
type: ApplyPluginsType.event,
|
|
||||||
args: { routes },
|
|
||||||
});
|
|
||||||
|
|
||||||
return routes;
|
|
||||||
}
|
|
|
@ -1,3 +0,0 @@
|
||||||
// @ts-nocheck
|
|
||||||
export { history, setCreateHistoryOptions } from './history';
|
|
||||||
export { plugin } from './plugin';
|
|
|
@ -1,58 +0,0 @@
|
||||||
// @ts-nocheck
|
|
||||||
import './core/polyfill';
|
|
||||||
import '@@/core/devScripts';
|
|
||||||
import { plugin } from './core/plugin';
|
|
||||||
import './core/pluginRegister';
|
|
||||||
import { createHistory } from './core/history';
|
|
||||||
import { ApplyPluginsType } from '/Users/caishi/forgeplus-react/node_modules/@umijs/runtime';
|
|
||||||
import { renderClient } from '/Users/caishi/forgeplus-react/node_modules/@umijs/renderer-react/dist/index.js';
|
|
||||||
import { getRoutes } from './core/routes';
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const getClientRender = (args: { hot?: boolean; routes?: any[] } = {}) => plugin.applyPlugins({
|
|
||||||
key: 'render',
|
|
||||||
type: ApplyPluginsType.compose,
|
|
||||||
initialValue: () => {
|
|
||||||
const opts = plugin.applyPlugins({
|
|
||||||
key: 'modifyClientRenderOpts',
|
|
||||||
type: ApplyPluginsType.modify,
|
|
||||||
initialValue: {
|
|
||||||
routes: args.routes || getRoutes(),
|
|
||||||
plugin,
|
|
||||||
history: createHistory(args.hot),
|
|
||||||
isServer: process.env.__IS_SERVER,
|
|
||||||
rootElement: 'root',
|
|
||||||
defaultTitle: ``,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
return renderClient(opts);
|
|
||||||
},
|
|
||||||
args,
|
|
||||||
});
|
|
||||||
|
|
||||||
const clientRender = getClientRender();
|
|
||||||
export default clientRender();
|
|
||||||
|
|
||||||
|
|
||||||
window.g_umi = {
|
|
||||||
version: '3.2.17',
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
// hot module replacement
|
|
||||||
// @ts-ignore
|
|
||||||
if (module.hot) {
|
|
||||||
// @ts-ignore
|
|
||||||
module.hot.accept('./core/routes', () => {
|
|
||||||
const ret = require('./core/routes');
|
|
||||||
if (ret.then) {
|
|
||||||
ret.then(({ getRoutes }) => {
|
|
||||||
getClientRender({ hot: true, routes: getRoutes() })();
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
getClientRender({ hot: true, routes: ret.getRoutes() })();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
Loading…
Reference in New Issue