From b5ca0fa17b1eb90c9ea72068e0f88bb282fb53a4 Mon Sep 17 00:00:00 2001 From: orangemug Date: Tue, 7 Nov 2017 11:05:30 +0000 Subject: [PATCH] Updated webpack deps. --- config/webpack.config.js | 4 ++-- config/webpack.loaders.js | 14 +++++++------- package.json | 6 +++--- src/libs/mapbox-rtl.js | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/config/webpack.config.js b/config/webpack.config.js index fba07dc..505a8bb 100644 --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -20,7 +20,7 @@ module.exports = { filename: 'bundle.js' }, resolve: { - extensions: ['', '.js', '.jsx'] + extensions: ['.js', '.jsx'] }, module: { noParse: [ @@ -48,7 +48,7 @@ module.exports = { host: HOST }, plugins: [ - new webpack.NoErrorsPlugin(), + new webpack.NoEmitOnErrorsPlugin(), new webpack.HotModuleReplacementPlugin(), new HtmlWebpackPlugin({ title: 'Maputnik', diff --git a/config/webpack.loaders.js b/config/webpack.loaders.js index 05e3416..f931b7b 100644 --- a/config/webpack.loaders.js +++ b/config/webpack.loaders.js @@ -7,23 +7,23 @@ module.exports = [ { test: /\.jsx?$/, exclude: /(.*node_modules(?![\/\\]@mapbox[\/\\]mapbox-gl-style-spec)|bower_components|public)/, - loader: 'babel', + loader: 'babel-loader', query: { - presets: ['es2015', 'react'], + presets: ['env', 'react'], plugins: ['transform-runtime', 'transform-decorators-legacy', 'transform-class-properties'], } }, { test: /\.(eot|ttf|woff|woff2)$/, - loader: 'file?name=fonts/[name].[ext]' + loader: 'file-loader?name=fonts/[name].[ext]' }, { test: /\.ico$/, - loader: 'file?name=[name].[ext]' + loader: 'file-loader?name=[name].[ext]' }, { test: /\.(svg|gif|jpg|png)$/, - loader: 'file?name=img/[name].[ext]' + loader: 'file-loader?name=img/[name].[ext]' }, { test: /\.json$/, @@ -36,8 +36,8 @@ module.exports = [ { test: /[\/\\](node_modules|global|src)[\/\\].*\.css$/, loaders: [ - 'style?sourceMap', - 'css' + 'style-loader?sourceMap', + 'css-loader' ] } ]; diff --git a/package.json b/package.json index b947b9d..2386026 100644 --- a/package.json +++ b/package.json @@ -124,8 +124,8 @@ "wdio-phantomjs-service": "^0.2.2", "wdio-spec-reporter": "^0.1.2", "webdriverio": "^4.8.0", - "webpack": "^1.14.0", - "webpack-cleanup-plugin": "^0.4.2", - "webpack-dev-server": "^1.16.2" + "webpack": "^3.8.1", + "webpack-cleanup-plugin": "^0.5.1", + "webpack-dev-server": "^2.9.4" } } diff --git a/src/libs/mapbox-rtl.js b/src/libs/mapbox-rtl.js index 558bea2..f9dc199 100644 --- a/src/libs/mapbox-rtl.js +++ b/src/libs/mapbox-rtl.js @@ -1,7 +1,7 @@ import MapboxGl from 'mapbox-gl/dist/mapbox-gl.js' // Load mapbox-gl-rtl-text using object urls without needing http://localhost for AJAX. -const data = require("base64?mimetype=text/javascript!@mapbox/mapbox-gl-rtl-text/mapbox-gl-rtl-text.js"); +const data = require("base64-loader?mimetype=text/javascript!@mapbox/mapbox-gl-rtl-text/mapbox-gl-rtl-text.js"); const blob = new window.Blob([window.atob(data)]); const objectUrl = window.URL.createObjectURL(blob, {