Commit 88b85407 authored by afc163's avatar afc163

Add loading component for dynamicImport

parent d61aaf8f
...@@ -19,7 +19,9 @@ export default { ...@@ -19,7 +19,9 @@ export default {
default: 'zh-CN', // default zh-CN default: 'zh-CN', // default zh-CN
baseNavigator: true, // default true, when it is true, will use `navigator.language` overwrite default baseNavigator: true, // default true, when it is true, will use `navigator.language` overwrite default
}, },
dynamicImport: true, dynamicImport: {
loadingComponent: './components/PageLoading/index',
},
polyfills: ['ie11'], polyfills: ['ie11'],
...(!process.env.TEST && os.platform() === 'darwin' ...(!process.env.TEST && os.platform() === 'darwin'
? { ? {
......
import React from 'react';
import { Spin } from 'antd';
// loading components from code split
// https://umijs.org/plugin/umi-plugin-react.html#dynamicimport
export default () => (
<div style={{ paddingTop: 100, textAlign: 'center' }}>
<Spin size="large" />
</div>
);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment