Skip to content

Commit d00da65

Browse files
committed
for leaflet 支持ie8
1 parent 4e47dce commit d00da65

File tree

7 files changed

+7541
-8878
lines changed

7 files changed

+7541
-8878
lines changed

build/webpack.config.leaflet.js

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,31 +40,33 @@ module.exports = {
4040
}
4141
}]
4242
}, {
43-
test: /\.js/,
43+
test: [/\.js$/],
4444
exclude: /node_modules[\/\\]proj4|classic/,
4545
loader: 'babel-loader',
4646
query: {
4747
presets: ['es2015'],
4848
plugins: [
49-
'transform-class-properties',
49+
'transform-class-properties',"transform-eval",
5050
]
5151
}
52-
}, {
52+
},{
53+
test: /\.js$/,
54+
enforce:"post",
55+
loaders: ['es3ify-loader'],
56+
},
57+
{
5358
test: /\.css$/,
5459
use: ExtractTextPlugin.extract({
5560
use: {
5661
loader: 'css-loader',
5762
}
5863
}),
5964
}],
60-
loaders: [{
61-
test: /\.css$/,
62-
loader: ExtractTextPlugin.extract(['style-loader', 'css-loader'])
63-
}]
65+
6466
},
6567
plugins: [
6668
new webpack.BannerPlugin(banner),
67-
new ExtractTextPlugin('/../dist/' + packageName + ".css")
69+
new ExtractTextPlugin('/../dist/' + packageName + ".css"),
6870
]
6971

7072
};

build/webpack.config.openlayers.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ module.exports = {
3636
use: [{
3737
loader: 'url-loader',
3838
options: {
39-
limit: 100000
39+
limit: 30000
4040
}
4141
}]
4242
}, {
43-
test: /\.js/,
43+
test: /\.js$/,
4444
exclude: /classic/,
4545
loader: 'babel-loader',
4646
query: {
@@ -57,10 +57,6 @@ module.exports = {
5757
}
5858
}),
5959
}],
60-
loaders: [{
61-
test: /\.css$/,
62-
loader: ExtractTextPlugin.extract(['style-loader', 'css-loader'])
63-
}]
6460
},
6561
plugins: [
6662
new webpack.BannerPlugin(banner),

0 commit comments

Comments
 (0)