Skip to content

Commit ac2bca9

Browse files
[fix]升级@elastic/elasticsearch => 5.6.22 review by xiongjj
1 parent f59cd16 commit ac2bca9

File tree

7 files changed

+229
-65
lines changed

7 files changed

+229
-65
lines changed

build/webpack.config.base.js

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,23 @@ module.exports = {
5656

5757
//其它解决方案配置
5858
resolve: {
59-
extensions: ['.js', '.json', '.css']
59+
extensions: ['.js', '.json', '.css'],
60+
mainFields: ['browser', 'main'],
61+
fallback: {
62+
fs: false,
63+
http: require.resolve('stream-http'),
64+
https: require.resolve('https-browserify'),
65+
os: require.resolve('os-browserify/browser'),
66+
stream: require.resolve('stream-browserify'),
67+
tty: require.resolve('tty-browserify'),
68+
zlib: require.resolve('browserify-zlib')
69+
}
6070
},
6171

6272
externals: {
6373
echarts: 'function(){try{return echarts}catch(e){return {}}}()',
6474
mapv: 'function(){try{return mapv}catch(e){return {}}}()',
65-
elasticsearch: 'function(){try{return elasticsearch}catch(e){return {}}}()',
75+
'@elastic/elasticsearch': 'function(){try{return elasticsearch}catch(e){return {}}}()',
6676
'@tensorflow/tfjs': 'function(){try{return tf}catch(e){return {}}}()'
6777
},
6878

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@
7777
"cross-env": "^7.0.2",
7878
"css-loader": "^6.7.1",
7979
"es3ify-loader": "^0.2.0",
80+
"elasticsearch": "16.7.3",
8081
"eslint": "^7.11.0",
8182
"eslint-plugin-import": "^2.22.1",
8283
"eslint-webpack-plugin": "^2.1.0",
@@ -113,13 +114,13 @@
113114
"webpack-node-externals": "^2.5.2"
114115
},
115116
"dependencies": {
117+
"@elastic/elasticsearch": "^5.6.22",
116118
"@mapbox/vector-tile": "1.3.1",
117119
"@supermap/iclient-common": "file:src/common",
118120
"@tensorflow/tfjs": "^3.9.0",
119121
"@turf/turf": "6.5.0",
120122
"canvg": "3.0.7",
121123
"echarts": "4.9.0",
122-
"elasticsearch": "16.7.3",
123124
"fetch-ie8": "1.5.0",
124125
"fetch-jsonp": "1.1.3",
125126
"jsonsql": "0.2.5",
@@ -133,6 +134,7 @@
133134
"proj4": "2.8.0",
134135
"promise-polyfill": "8.2.3",
135136
"three": "0.129.0",
137+
"util": "^0.12.4",
136138
"xlsx": "0.18.5",
137139
"xml-js": "1.6.11"
138140
},

src/common/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"author": "SuperMap",
1515
"license": "Apache-2.0",
1616
"dependencies": {
17-
"elasticsearch": "16.7.3",
17+
"@elastic/elasticsearch": "^5.6.22",
1818
"fetch-ie8": "1.5.0",
1919
"fetch-jsonp": "1.1.3",
2020
"promise-polyfill": "8.2.3",

0 commit comments

Comments
 (0)