Some modules aren't ES5 so we much compile them

This commit is contained in:
orangemug
2018-02-07 11:00:24 +00:00
parent 8f8ed6dff3
commit de21eea21b
4 changed files with 36 additions and 3 deletions
+1 -2
View File
@@ -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
},
+2 -1
View File
@@ -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'],