Commit e7fcbd4f authored by 杨思琦's avatar 杨思琦

perf: 公共包调整

parent 6e220418
...@@ -114,7 +114,7 @@ ...@@ -114,7 +114,7 @@
"@wisdom-components/empty": "^1.4.1", "@wisdom-components/empty": "^1.4.1",
"@wisdom-components/videoslidermodal": "^1.1.60", "@wisdom-components/videoslidermodal": "^1.1.60",
"@wisdom-map/amap":"^2.0.9", "@wisdom-map/amap":"^2.0.9",
"@wisdom-map/arcgismap":"^2.0.30", "@wisdom-map/arcgismap":"^2.0.31",
"@wisdom-map/basemap":"^2.0.2", "@wisdom-map/basemap":"^2.0.2",
"@wisdom-map/util":"1.2.9", "@wisdom-map/util":"1.2.9",
"@wisdom-utils/components": "0.1.370", "@wisdom-utils/components": "0.1.370",
......
...@@ -290,44 +290,13 @@ export const loadMicroApps = (apps, pathName) => { ...@@ -290,44 +290,13 @@ export const loadMicroApps = (apps, pathName) => {
const loadPlugins = () => { const loadPlugins = () => {
require.ensure([], () => { require.ensure([], () => {
const commonPackage = { const commonPackage = {
'react/jsx-runtime': { require: require.context('../node_modules/react', true, /^.\/jsx-runtime\.js$/), entry: 'jsx-runtime.js' },
'react': { require: require.context('react', true, /^.\/index\.js$/), entry: 'index.js' },
'react-router': { require: require.context('react-router', true, /^.\/index\.js$/), entry: 'index.js' },
'immutable': { require: require.context('../node_modules/immutable/dist', true, /^.\/(dist\/)?[^\/]+\.js$/), entry: 'immutable.min.js' },
'redux-immutable': { require: require.context('../node_modules/redux-immutable/dist', true, /^.\/(dist\/)?[^\/]+\.js$/), entry: 'index.js' },
'redux-logger': { require: require.context('../node_modules/redux-logger/dist', true, /^.\/(dist\/)?[^\/]+\.js$/), entry: 'redux-logger.js' },
'react-helmet': { require: require.context('../node_modules/react-helmet/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), entry: 'Helmet.js' },
'react-dom': { require: require.context('react-dom', true, /^.\/index\.js$/), entry: 'index.js' },
'react-router-dom': { require: require.context('react-router-dom', true, /^.\/index\.js$/), entry: 'index.js' },
'react-redux': { require: require.context('../node_modules/react-redux/dist', true, /^.\/(dist\/)?[^\/]+\.js$/), entry: 'react-redux.min.js' },
'redux': { require: require.context('../node_modules/redux/dist', true, /^.\/(dist\/)?[^\/]+\.js$/), entry: 'redux.min.js' },
'axios': { require: require.context('../node_modules/axios/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), entry: 'axios.js' },
'mqtt-client': { require: require.context('../node_modules/mqtt-client/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), entry: 'index.js' }, 'mqtt-client': { require: require.context('../node_modules/mqtt-client/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), entry: 'index.js' },
'js-base64': { require: require.context('../node_modules/js-base64', true, /[^\/]+\.js$/), entry: 'base64.js' }, 'js-base64': { require: require.context('../node_modules/js-base64', true, /[^\/]+\.js$/), entry: 'base64.js' },
'@wisdom-utils/utils': { require: require.context('../node_modules/@wisdom-utils/utils/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), entry: 'index.js' },
'@wisdom-utils/runtime': { require: require.context('../node_modules/@wisdom-utils/runtime/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), entry: 'index.js' },
'classnames': { require: require.context('classnames', true, /^.\/index\.js$/), entry: 'index.js' },
'@ant-design/icons': { require: require.context('../node_modules/@ant-design/icons/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), entry: 'index.js' },
'@ant-design/pro-provider': { require: require.context('../node_modules/@ant-design/pro-provider/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), entry: 'index.js' },
'@ant-design/pro-form': { require: require.context('../node_modules/@ant-design/pro-form/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), entry: 'index.js' },
'pinyin-match': { require: require.context('../node_modules/pinyin-match/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), entry: 'main.js' },
'react-intl': { require: require.context('../node_modules/react-intl/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), entry: 'index.js' },
'qrcode.react': { require: require.context('../node_modules/qrcode.react/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), entry: 'index.js' },
'qr.js': { require: require.context('qr.js', true, /^.\/index\.js$/), entry: 'index.js' }, 'qr.js': { require: require.context('qr.js', true, /^.\/index\.js$/), entry: 'index.js' },
'react-helmet-async': { require: require.context('../node_modules/react-helmet-async/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), entry: 'index.js' },
'connected-react-router': { require: require.context('../node_modules/connected-react-router/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), entry: 'index.js' },
'query-string': { require: require.context('query-string', true, /^.\/index\.js$/), entry: 'index.js' }, 'query-string': { require: require.context('query-string', true, /^.\/index\.js$/), entry: 'index.js' },
'@wisdom-map/arcgismap': { require: require.context('../node_modules/@wisdom-map/arcgismap/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), entry: 'index.js' },
'@wisdom-map/amap': { require: require.context('../node_modules/@wisdom-map/amap/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), entry: 'index.js' },
'@wisdom-map/basemap': { require: require.context('../node_modules/@wisdom-map/basemap/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), entry: 'index.js' },
'lodash': { require: require.context('lodash', true, /^.\/index\.js$/), entry: 'index.js' },
'kit_logger': { require: require.context('../node_modules/kit_logger/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), entry: 'index.js' }, 'kit_logger': { require: require.context('../node_modules/kit_logger/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), entry: 'index.js' },
'kit_utils': { require: require.context('../node_modules/kit_utils/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), entry: 'index.js' }, 'kit_utils': { require: require.context('../node_modules/kit_utils/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), entry: 'index.js' },
'kit_global_config': { require: require.context('../node_modules/kit_global_config/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), entry: 'index.js' }, 'kit_global_config': { require: require.context('../node_modules/kit_global_config/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), entry: 'index.js' },
'@ant-design/pro-list': { require: require.context('../node_modules/@ant-design/pro-list/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), entry: 'index.js' },
'@ant-design/pro-utils': { require: require.context('../node_modules/@ant-design/pro-utils/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), entry: 'index.js' },
'@ant-design/pro-layout': { require: require.context('../node_modules/@ant-design/pro-layout/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), entry: 'index.js' },
'@ant-design/pro-table': { require: require.context('../node_modules/@ant-design/pro-table/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), entry: 'index.js' },
'echarts': { require: require.context('../node_modules/echarts/dist', true, /^.\/echarts.min\.js$/), entry: 'echarts.min.js' }, 'echarts': { require: require.context('../node_modules/echarts/dist', true, /^.\/echarts.min\.js$/), entry: 'echarts.min.js' },
}; };
Object.keys(commonPackage).map((pkg) => { Object.keys(commonPackage).map((pkg) => {
...@@ -513,4 +482,39 @@ window.app = { ...@@ -513,4 +482,39 @@ window.app = {
init: function (namespace, reducers) { init: function (namespace, reducers) {
[namespace] = reducers; [namespace] = reducers;
} }
}; };
\ No newline at end of file
window.app.define('react', require.context('react', true, /^.\/index\.js$/), 'index.js');
window.app.define('react/jsx-runtime', require.context('../node_modules/react', true, /^.\/jsx-runtime\.js$/), 'jsx-runtime.js');
window.app.define('react-dom', require.context('react-dom', true, /^.\/index\.js$/), 'index.js');
window.app.define('react-router', require.context('react-router', true, /^.\/index\.js$/), 'index.js');
window.app.define('connected-react-router', require.context('../node_modules/connected-react-router/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
window.app.define('react-helmet', require.context('../node_modules/react-helmet/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'Helmet.js');
window.app.define('qrcode.react', require.context('../node_modules/qrcode.react/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
window.app.define('react-helmet-async', require.context('../node_modules/react-helmet-async/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
window.app.define('immutable', require.context('../node_modules/immutable/dist', true, /^.\/(dist\/)?[^\/]+\.js$/), 'immutable.min.js');
window.app.define('redux-immutable', require.context('../node_modules/redux-immutable/dist', true, /^.\/(dist\/)?[^\/]+\.js$/), 'index.js');
window.app.define('redux-logger', require.context('../node_modules/redux-logger/dist', true, /^.\/(dist\/)?[^\/]+\.js$/), 'redux-logger.js');
window.app.define('react-router-dom', require.context('react-router-dom', true, /^.\/index\.js$/), 'index.js');
window.app.define('react-redux', require.context('../node_modules/react-redux/dist', true, /^.\/(dist\/)?[^\/]+\.js$/), 'react-redux.min.js');
window.app.define('redux', require.context('../node_modules/redux/dist', true, /^.\/(dist\/)?[^\/]+\.js$/), 'redux.min.js')
window.app.define('axios', require.context('../node_modules/axios/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'axios.js');
window.app.define('classnames', require.context('classnames', true, /^.\/index\.js$/), 'index.js');
window.app.define('@ant-design/pro-list', require.context('../node_modules/@ant-design/pro-list/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
window.app.define('@ant-design/icons', require.context('../node_modules/@ant-design/icons/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
window.app.define('@ant-design/pro-utils', require.context('../node_modules/@ant-design/pro-utils/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
window.app.define('@ant-design/pro-layout', require.context('../node_modules/@ant-design/pro-layout/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
window.app.define('@ant-design/pro-table', require.context('../node_modules/@ant-design/pro-table/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
window.app.define('@ant-design/pro-form', require.context('../node_modules/@ant-design/pro-form/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
window.app.define('@ant-design/pro-provider', require.context('../node_modules/@ant-design/pro-provider/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
window.app.define('pinyin-match', require.context('../node_modules/pinyin-match/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'main.js');
window.app.define('react-intl', require.context('../node_modules/react-intl/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
window.app.define('moment', require.context('moment', true, /^.\/moment\.js$/), 'moment.js');
window.app.define('lodash', require.context('lodash', true, /^.\/index\.js$/), 'index.js');
window.app.define('@wisdom-utils/utils', require.context('../node_modules/@wisdom-utils/utils/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
window.app.define('@wisdom-utils/runtime', require.context('../node_modules/@wisdom-utils/runtime/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
window.app.define('@wisdom-utils/components', require.context('../node_modules/@wisdom-utils/components/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
window.app.define('@wisdom-map/arcgismap', require.context('../node_modules/@wisdom-map/arcgismap/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
window.app.define('@wisdom-map/amap', require.context('../node_modules/@wisdom-map/amap/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
window.app.define('@wisdom-map/basemap', require.context('../node_modules/@wisdom-map/basemap/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
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