diff --git a/build/webpack.config.mapboxgl.js b/build/webpack.config.mapboxgl.js index d4575a87f..bc1cbf800 100644 --- a/build/webpack.config.mapboxgl.js +++ b/build/webpack.config.mapboxgl.js @@ -28,8 +28,7 @@ module.exports = { 'webgl-debug': '(function(){try{return webgl-debug}catch(e){return {}}})()', xlsx: 'function(){try{return XLSX}catch(e){return {}}}()', canvg: 'function(){try{return canvg}catch(e){return {}}}()', - jsonsql: 'function(){try{return jsonsql}catch(e){return {}}}()', - 'xml-js': 'function(){try{return convert}catch(e){return {}}}()' + jsonsql: 'function(){try{return jsonsql}catch(e){return {}}}()' }), module: { diff --git a/src/common/thirdparty/elasticsearch/ElasticSearch.js b/src/common/thirdparty/elasticsearch/ElasticSearch.js index 673a21c5d..ac0cc3aa8 100644 --- a/src/common/thirdparty/elasticsearch/ElasticSearch.js +++ b/src/common/thirdparty/elasticsearch/ElasticSearch.js @@ -2,7 +2,6 @@ * This program are made available under the terms of the Apache License, Version 2.0 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/ import {Events} from '../../commontypes/Events'; -import es from '@elastic/elasticsearch'; import {Util} from "../../commontypes/Util"; /** @@ -60,6 +59,7 @@ export class ElasticSearch { * @member {Object} ElasticSearch.prototype.client * @description client ES客户端。 */ + var es = require('@elastic/elasticsearch'); try { // 老版本 this.client = new es.Client({ diff --git a/src/mapboxgl/mapping/WebMap.js b/src/mapboxgl/mapping/WebMap.js index cc32cdfbf..aea7fb2f5 100644 --- a/src/mapboxgl/mapping/WebMap.js +++ b/src/mapboxgl/mapping/WebMap.js @@ -16,7 +16,7 @@ import { Lang } from '@supermap/iclient-common/lang/Lang'; import { parseCondition, parseConditionFeature } from '@supermap/iclient-common/util/FilterCondition'; import { Util } from '../core/Util'; import { QueryService } from '../services/QueryService'; -import convert from 'xml-js'; +import convert from 'xml-js/dist/xml-js.min'; import Canvg from 'canvg';