diff --git a/config/config.js b/config/config.js index fab44a84ec30a08adabf378ddba8ffba94837d35..b73a21dfb08bca6fc423c4d9efaf7aeb5aa235f4 100644 --- a/config/config.js +++ b/config/config.js @@ -19,7 +19,9 @@ export default { default: 'zh-CN', // default zh-CN baseNavigator: true, // default true, when it is true, will use `navigator.language` overwrite default }, - dynamicImport: true, + dynamicImport: { + loadingComponent: './components/PageLoading/index', + }, polyfills: ['ie11'], ...(!process.env.TEST && os.platform() === 'darwin' ? { diff --git a/src/components/PageLoading/index.js b/src/components/PageLoading/index.js new file mode 100644 index 0000000000000000000000000000000000000000..77c0f165f9d20b4f974e754efb9cf08606c41a49 --- /dev/null +++ b/src/components/PageLoading/index.js @@ -0,0 +1,10 @@ +import React from 'react'; +import { Spin } from 'antd'; + +// loading components from code split +// https://umijs.org/plugin/umi-plugin-react.html#dynamicimport +export default () => ( +