Skip to content

Commit 366343a

Browse files
committed
fix 打包在IE8下无法使用问题(需拆分common和leaflet下模块一步导出为先导入再导出【babel转换引起】)
fix leaflet在IE8下请求无法使用相关问题
1 parent e968767 commit 366343a

File tree

36 files changed

+6986
-7674
lines changed

36 files changed

+6986
-7674
lines changed

build/webpack.config.leaflet.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ module.exports = {
5050
}
5151
}, {
5252
test: [/\.js$/],
53-
exclude: /node_modules[\/\\]proj4|classic/,
53+
exclude: /node_modules[\/\\]proj4|setImmediate/,
5454
loader: 'babel-loader',
55-
query: {
55+
options: {
5656
presets: ['es2015']
5757
}
5858
}, {

dist/iclient9-leaflet.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/iclient9-leaflet.js

Lines changed: 4764 additions & 7220 deletions
Large diffs are not rendered by default.

dist/iclient9-leaflet.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/iclient9-leaflet.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,10 @@
106106
"@supermap/iclient-common": "file:src/common",
107107
"fetch-jsonp": "1.0.6",
108108
"jsonsql": "^0.2.5",
109+
"lodash.topairs": "^4.3.0",
109110
"pbf": "3.0.2",
110111
"proj4": "2.3.15",
111112
"promise-polyfill": "^6.0.2",
112-
"lodash": "^4.17.4",
113-
"whatwg-fetch-importable": "^1.0.3"
113+
"fetch-ie8": "^1.5.0"
114114
}
115115
}
Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,23 @@
1-
export {Collection} from './Collection';
2-
export {Curve} from './Curve';
3-
export {GeoText} from './GeoText';
4-
export {LinearRing} from './LinearRing';
5-
export {LineString} from './LineString';
6-
export {MultiLineString} from './MultiLineString';
7-
export {MultiPoint} from './MultiPoint';
8-
export {MultiPolygon} from './MultiPolygon';
9-
export {Point as GeometryPoint} from './Point';
10-
export {Polygon} from './Polygon';
11-
export {Rectangle} from './Rectangle';
1+
import {Collection} from './Collection';
2+
import {Curve} from './Curve';
3+
import {GeoText} from './GeoText' ;
4+
import {LinearRing} from './LinearRing' ;
5+
import {LineString} from './LineString' ;
6+
import {MultiLineString} from './MultiLineString' ;
7+
import {MultiPoint} from './MultiPoint' ;
8+
import {MultiPolygon} from './MultiPolygon' ;
9+
import {Point as GeometryPoint} from './Point' ;
10+
import {Polygon} from './Polygon' ;
11+
import {Rectangle} from './Rectangle';
12+
13+
export {Collection} ;
14+
export {Curve} ;
15+
export {GeoText} ;
16+
export {LinearRing};
17+
export {LineString} ;
18+
export {MultiLineString} ;
19+
export {MultiPoint} ;
20+
export {MultiPolygon} ;
21+
export {GeometryPoint} ;
22+
export {Polygon};
23+
export {Rectangle} ;

src/common/commontypes/index.js

Lines changed: 63 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,63 @@
1-
export * from './geometry/index'
2-
export {StringExt, NumberExt, FunctionExt, ArrayExt} from './BaseTypes';
3-
export {Bounds} from './Bounds';
4-
export {Credential} from './Credential';
5-
export * from './Date';
6-
export * from './Event';
7-
export {Events} from './Events';
8-
export {Feature} from './Feature';
9-
export {Geometry} from './Geometry';
10-
export {LonLat} from './LonLat';
11-
export * from './Pixel';
12-
export {Size} from './Size';
13-
export {Util as CommonUtil} from './Util';
14-
export {Vector as GeometryVector} from './Vector';
1+
import {
2+
Collection,
3+
Curve,
4+
GeoText,
5+
LinearRing,
6+
LineString,
7+
MultiLineString,
8+
MultiPoint,
9+
MultiPolygon,
10+
GeometryPoint,
11+
Polygon,
12+
Rectangle
13+
} from './geometry/index' ;
14+
import {
15+
StringExt,
16+
NumberExt,
17+
FunctionExt,
18+
ArrayExt
19+
} from './BaseTypes' ;
20+
import {Bounds} from './Bounds' ;
21+
import {Credential} from './Credential' ;
22+
import {DateExt} from './Date' ;
23+
import {Event} from './Event' ;
24+
import {Events} from './Events' ;
25+
import {Feature} from './Feature' ;
26+
import {Geometry} from './Geometry' ;
27+
import {LonLat} from './LonLat' ;
28+
import {Pixel} from './Pixel' ;
29+
import {Size} from './Size' ;
30+
import {Util as CommonUtil} from './Util' ;
31+
import {Vector as GeometryVector} from './Vector' ;
32+
33+
export {
34+
Collection,
35+
Curve,
36+
GeoText,
37+
LinearRing,
38+
LineString,
39+
MultiLineString,
40+
MultiPoint,
41+
MultiPolygon,
42+
GeometryPoint,
43+
Polygon,
44+
Rectangle
45+
};
46+
export {
47+
StringExt,
48+
NumberExt,
49+
FunctionExt,
50+
ArrayExt
51+
}
52+
export {Bounds};
53+
export {Credential};
54+
export {DateExt}
55+
export {Event}
56+
export {Events};
57+
export {Feature};
58+
export {Geometry} ;
59+
export {LonLat};
60+
export {Pixel} ;
61+
export {Size};
62+
export {CommonUtil} ;
63+
export {GeometryVector};

src/common/control/index.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
import "./img/iClient.png";
2+
import {TimeControlBase} from './TimeControlBase';
3+
import {TimeFlowControl} from './TimeFlowControl';
24

3-
export {TimeControlBase} from './TimeControlBase';
4-
export {TimeFlowControl} from './TimeFlowControl';
5+
export {TimeControlBase} ;
6+
export {TimeFlowControl};

src/common/format/index.js

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
export {Format} from './Format';
2-
export {GeoJSON} from './GeoJSON';
3-
export {JSONFormat} from './JSON';
4-
export {WKT} from './WKT';
1+
import {Format} from './Format';
2+
import {GeoJSON} from './GeoJSON';
3+
import {JSONFormat} from './JSON';
4+
import {WKT} from './WKT';
5+
6+
export {Format} ;
7+
export {JSONFormat} ;
8+
export {GeoJSON} ;
9+
export {WKT} ;

0 commit comments

Comments
 (0)