diff --git a/config/webpack.config.js b/config/webpack.config.js index 24a2852..aa74a29 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -25,8 +25,7 @@ module.exports = { }, module: { noParse: [ - /mapbox-gl\/dist\/mapbox-gl.js/, - /openlayers\/dist\/ol.js/ + /mapbox-gl\/dist\/mapbox-gl.js/ ], loaders: loaders }, diff --git a/config/webpack.loaders.js b/config/webpack.loaders.js index fa6c4cc..44215cd 100644 --- a/config/webpack.loaders.js +++ b/config/webpack.loaders.js @@ -17,7 +17,8 @@ module.exports = [ }, { test: /\.jsx?$/, - exclude: /(.*node_modules(?![\/\\]@mapbox[\/\\]mapbox-gl-style-spec)|bower_components|public)/, + // Note: These modules aren't ES5 therefore we much compile them. + exclude: /(.*node_modules(?![\/\\](@mapbox[\/\\]mapbox-gl-style-spec|ol|mapbox-to-ol-style))|bower_components|public)/, loader: 'babel-loader', query: { presets: ['env', 'react'], diff --git a/package-lock.json b/package-lock.json index f0ec28a..080b0fc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1398,6 +1398,38 @@ } } }, + "babel-preset-es2015": { + "version": "6.24.1", + "resolved": "https://registry.npmjs.org/babel-preset-es2015/-/babel-preset-es2015-6.24.1.tgz", + "integrity": "sha1-1EBQ1rwsn+6nAqrzjXJ6AhBTiTk=", + "dev": true, + "requires": { + "babel-plugin-check-es2015-constants": "6.22.0", + "babel-plugin-transform-es2015-arrow-functions": "6.22.0", + "babel-plugin-transform-es2015-block-scoped-functions": "6.22.0", + "babel-plugin-transform-es2015-block-scoping": "6.26.0", + "babel-plugin-transform-es2015-classes": "6.24.1", + "babel-plugin-transform-es2015-computed-properties": "6.24.1", + "babel-plugin-transform-es2015-destructuring": "6.23.0", + "babel-plugin-transform-es2015-duplicate-keys": "6.24.1", + "babel-plugin-transform-es2015-for-of": "6.23.0", + "babel-plugin-transform-es2015-function-name": "6.24.1", + "babel-plugin-transform-es2015-literals": "6.22.0", + "babel-plugin-transform-es2015-modules-amd": "6.24.1", + "babel-plugin-transform-es2015-modules-commonjs": "6.26.0", + "babel-plugin-transform-es2015-modules-systemjs": "6.24.1", + "babel-plugin-transform-es2015-modules-umd": "6.24.1", + "babel-plugin-transform-es2015-object-super": "6.24.1", + "babel-plugin-transform-es2015-parameters": "6.24.1", + "babel-plugin-transform-es2015-shorthand-properties": "6.24.1", + "babel-plugin-transform-es2015-spread": "6.22.0", + "babel-plugin-transform-es2015-sticky-regex": "6.24.1", + "babel-plugin-transform-es2015-template-literals": "6.22.0", + "babel-plugin-transform-es2015-typeof-symbol": "6.23.0", + "babel-plugin-transform-es2015-unicode-regex": "6.24.1", + "babel-plugin-transform-regenerator": "6.26.0" + } + }, "babel-preset-flow": { "version": "6.23.0", "resolved": "https://registry.npmjs.org/babel-preset-flow/-/babel-preset-flow-6.23.0.tgz", diff --git a/package.json b/package.json index 1747e41..ac4883d 100644 --- a/package.json +++ b/package.json @@ -97,6 +97,7 @@ "babel-plugin-transform-object-rest-spread": "^6.26.0", "babel-plugin-transform-runtime": "^6.23.0", "babel-preset-env": "^1.6.1", + "babel-preset-es2015": "^6.24.1", "babel-preset-flow": "^6.23.0", "babel-preset-react": "^6.24.1", "babel-runtime": "^6.26.0",