diff --git a/babel.config.js b/babel.config.js index 86cd8f9382..7294cc61a6 100644 --- a/babel.config.js +++ b/babel.config.js @@ -2,7 +2,12 @@ module.exports = { "presets": [ ["@babel/env", { "loose": true, - "modules": false + "modules": false, + "exclude": [ + "transform-destructuring", + "transform-spread", + "transform-parameters" + ] }] ], "plugins": [ diff --git a/rollup.config.js b/rollup.config.js index 1f4aca742a..c3a22f3b7b 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -35,6 +35,10 @@ const rollupPlugins = [ commonjs(), typescript({ sourceMap: true + }), + babel({ + extensions: [".ts"], + babelHelpers: 'bundled' }) ]; diff --git a/src/layer/tile/TileLayer.ts b/src/layer/tile/TileLayer.ts index 18e1cd1247..4bd79c3fa5 100644 --- a/src/layer/tile/TileLayer.ts +++ b/src/layer/tile/TileLayer.ts @@ -257,7 +257,9 @@ class TileLayer extends Layer { forceReload() { this.fire('forcereloadstart'); this.clear(); - this.load(); + if (this._renderer) { + this._renderer.setToRedraw(); + } this.fire('forcereloadend'); return this; } diff --git a/tsconfig.json b/tsconfig.json index bc69a8a128..d8b7352d21 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -19,7 +19,7 @@ // ask tsc not to mess up with for ... of "downlevelIteration": true, "module": "esnext", - "target": "es5", + "target": "es6", "jsx": "preserve", "lib": [ "es2015",