1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. // @ts-nocheck
  2. // This file is generated by Umi automatically
  3. // DO NOT CHANGE IT MANUALLY!
  4. import './core/polyfill';
  5. import 'E:/work/jgz/admin2/src/global.less';
  6. import 'E:/work/jgz/admin2/src/global.jsx';
  7. import 'antd/dist/antd.less';
  8. import { renderClient } from 'E:/work/jgz/admin2/node_modules/@umijs/preset-umi/node_modules/@umijs/renderer-react';
  9. import { getRoutes } from './core/route';
  10. import { createPluginManager } from './core/plugin';
  11. import { createHistory } from './core/history';
  12. import { ApplyPluginsType } from 'umi';
  13. const publicPath = "/w2/";
  14. const runtimePublicPath = false;
  15. async function render() {
  16. const pluginManager = createPluginManager();
  17. const { routes, routeComponents } = await getRoutes(pluginManager);
  18. // allow user to extend routes
  19. await pluginManager.applyPlugins({
  20. key: 'patchRoutes',
  21. type: ApplyPluginsType.event,
  22. args: {
  23. routes,
  24. routeComponents,
  25. },
  26. });
  27. return (pluginManager.applyPlugins({
  28. key: 'render',
  29. type: ApplyPluginsType.compose,
  30. initialValue() {
  31. const contextOpts = pluginManager.applyPlugins({
  32. key: 'modifyContextOpts',
  33. type: ApplyPluginsType.modify,
  34. initialValue: {},
  35. });
  36. const basename = contextOpts.basename || '/';
  37. const context = {
  38. routes,
  39. routeComponents,
  40. pluginManager,
  41. rootElement: contextOpts.rootElement || document.getElementById('root'),
  42. publicPath,
  43. runtimePublicPath,
  44. history: createHistory({
  45. type: contextOpts.historyType || 'hash',
  46. basename,
  47. ...contextOpts.historyOpts,
  48. }),
  49. basename,
  50. };
  51. return renderClient(context);
  52. },
  53. }))();
  54. }
  55. render();