Commit 0c41d795 authored by lihonglin's avatar lihonglin

feat: 地图库版本更新

parent 5b8ab1de
Pipeline #50457 passed with stages
in 46 seconds
...@@ -37,13 +37,7 @@ module.exports = { ...@@ -37,13 +37,7 @@ module.exports = {
ignoreMomentLocale: true, ignoreMomentLocale: true,
nodeModulesTransform: { nodeModulesTransform: {
type: 'none', type: 'none',
exclude: [ exclude: ['@wisdom-map/arcgismap', '@wisdom-map/amap', '@wisdom-map/basemap', 'swagger-ui-react', 'Cesium'],
'@wisdom-map/arcgismap',
'@wisdom-map/Amap',
'@wisdom-map/Map',
'swagger-ui-react',
'Cesium',
],
}, },
proxy: proxy[NODE_ENV], proxy: proxy[NODE_ENV],
// openAPI: { // openAPI: {
......
const { dirname } = require('path'); const { dirname } = require('path');
const { const { pkgUp, semver } = require('@umijs/utils');
pkgUp,
semver,
} = require('@umijs/utils');
const pkgPathCache = {}; const pkgPathCache = {};
const pkgCache = {}; const pkgCache = {};
...@@ -19,11 +16,10 @@ const TYPE_ALL_EXCLUDE = [ ...@@ -19,11 +16,10 @@ const TYPE_ALL_EXCLUDE = [
'react', 'react',
'react-dom', 'react-dom',
'@wisdom-map/arcgismap', '@wisdom-map/arcgismap',
'@wisdom-map/Amap', '@wisdom-map/amap',
'@wisdom-map/Map', '@wisdom-map/basemap',
]; ];
// 参考: // 参考:
// https://github.com/umijs/umi/blob/2.x/packages/af-webpack/src/getWebpackConfig/es5ImcompatibleVersions.js // https://github.com/umijs/umi/blob/2.x/packages/af-webpack/src/getWebpackConfig/es5ImcompatibleVersions.js
function isMatch(opts) { function isMatch(opts) {
...@@ -36,9 +32,7 @@ function isMatch(opts) { ...@@ -36,9 +32,7 @@ function isMatch(opts) {
const { name, version } = require(pkgPath); // eslint-disable-line const { name, version } = require(pkgPath); // eslint-disable-line
if (opts.pkgs[name]) { if (opts.pkgs[name]) {
pkgCache[pkgPath] = opts.pkgs[name].some((v) => { pkgCache[pkgPath] = opts.pkgs[name].some(v => semver.satisfies(version, v));
return semver.satisfies(version, v);
});
} else { } else {
pkgCache[pkgPath] = false; pkgCache[pkgPath] = false;
} }
...@@ -89,10 +83,10 @@ function es5ImcompatibleVersionsToPkg() { ...@@ -89,10 +83,10 @@ function es5ImcompatibleVersionsToPkg() {
} }
module.exports = { module.exports = {
TYPE_ALL_EXCLUDE, TYPE_ALL_EXCLUDE,
isMatch, isMatch,
getPkgPath, getPkgPath,
excludeToPkg, excludeToPkg,
excludeToPkgs, excludeToPkgs,
es5ImcompatibleVersionsToPkg es5ImcompatibleVersionsToPkg,
} };
\ No newline at end of file
...@@ -106,9 +106,9 @@ ...@@ -106,9 +106,9 @@
"@wisdom-cesium/cesium": "^1.0.80", "@wisdom-cesium/cesium": "^1.0.80",
"@wisdom-components/basictable": "^1.5.16", "@wisdom-components/basictable": "^1.5.16",
"@wisdom-components/empty": "^1.4.1", "@wisdom-components/empty": "^1.4.1",
"@wisdom-map/Amap": "^1.0.49-25", "@wisdom-map/amap": "^1.0.49-27",
"@wisdom-map/Map": "^1.0.12-38", "@wisdom-map/basemap": "^1.0.12-40",
"@wisdom-map/arcgismap": "^1.0.79-38", "@wisdom-map/arcgismap": "^1.0.79-40",
"@wisdom-map/util": "^1.0.27-0", "@wisdom-map/util": "^1.0.27-0",
"@wisdom-utils/components": "0.1.83", "@wisdom-utils/components": "0.1.83",
"@wisdom-utils/runtime": "0.0.15", "@wisdom-utils/runtime": "0.0.15",
......
...@@ -328,9 +328,8 @@ window.app.define('js-base64', require.context('../node_modules/js-base64', true ...@@ -328,9 +328,8 @@ window.app.define('js-base64', require.context('../node_modules/js-base64', true
* arcgismap * arcgismap
*/ */
window.app.define('@wisdom-map/arcgismap', require.context('../node_modules/@wisdom-map/arcgismap/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/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/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');
window.app.define('@wisdom-map/Map', require.context('../node_modules/@wisdom-map/Map/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/arcgismap', require.context('../node_modules/@wisdom-map/arcgismap/lib', true, /^.\/(lib\/)?[^\/]+\.js$/), 'index.js');
// // window.app.define('@wisdom-map/arcgismap/lib/widgets', require.context('../node_modules/@wisdom-map/arcgismap/lib/widgets', true, /^.\/(lib\/)?[^\/]+\.js$/)); // // window.app.define('@wisdom-map/arcgismap/lib/widgets', require.context('../node_modules/@wisdom-map/arcgismap/lib/widgets', true, /^.\/(lib\/)?[^\/]+\.js$/));
......
import React from 'react'; import React from 'react';
import { AMapScene } from '@wisdom-map/Amap'; import { AMapScene } from '@wisdom-map/amap';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import { store } from '@wisdom-utils/utils'; import { store } from '@wisdom-utils/utils';
import { actionCreators } from '../../../containers/App/store'; import { actionCreators } from '../../../containers/App/store';
......
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