From 419a7da48c4d7e6ac6ec1626369bc91ec2e5aa8a Mon Sep 17 00:00:00 2001 From: KahWee Teng Date: Tue, 23 May 2017 00:16:47 -0700 Subject: [PATCH] Upgraded to Webpack 2 --- package.json | 14 +++++++------- webpack.conf.js | 8 ++++---- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index 3695ecc..7299d93 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "dependencies": { "autoprefixer": "^6.3.7", "babel-eslint": "^6.1.2", - "babel-loader": "^6.2.4", + "babel-loader": "^7.0.0", "babel-plugin-syntax-object-rest-spread": "^6.13.0", "babel-plugin-transform-class-properties": "^6.10.2", "babel-plugin-transform-object-assign": "^6.8.0", @@ -23,21 +23,21 @@ "babel-preset-es2015": "^6.9.0", "babel-register": "^6.11.6", "browser-sync": "^2.13.0", - "css-loader": "^0.23.1", + "css-loader": "^0.28.2", "eslint": "^3.1.1", "eslint-plugin-import": "^1.11.1", "exports-loader": "^0.6.3", - "file-loader": "^0.9.0", + "file-loader": "^0.11.1", "gulp": "^3.9.1", "gulp-babel": "^6.1.2", "gulp-postcss": "^6.1.1", "gulp-util": "^3.0.7", - "imports-loader": "^0.6.5", + "imports-loader": "^0.7.1", "postcss-cssnext": "^2.7.0", - "postcss-import": "^8.1.2", - "postcss-loader": "^0.9.1", + "postcss-import": "^10.0.0", + "postcss-loader": "^2.0.5", "url-loader": "^0.5.7", - "webpack": "^1.13.1", + "webpack": "^2.6.0", "whatwg-fetch": "^1.0.0" } } diff --git a/webpack.conf.js b/webpack.conf.js index 8cc81c6..632c33e 100644 --- a/webpack.conf.js +++ b/webpack.conf.js @@ -3,14 +3,14 @@ import path from "path"; export default { module: { - loaders: [ + rules: [ { test: /\.((png)|(eot)|(woff)|(woff2)|(ttf)|(svg)|(gif))(\?v=\d+\.\d+\.\d+)?$/, - loader: "file?name=/[hash].[ext]" + loader: "file-loader?name=/[hash].[ext]" }, {test: /\.json$/, loader: "json-loader"}, { - loader: "babel", + loader: "babel-loader", test: /\.js?$/, exclude: /node_modules/, query: {cacheDirectory: true} @@ -20,7 +20,7 @@ export default { plugins: [ new webpack.ProvidePlugin({ - "fetch": "imports?this=>global!exports?global.fetch!whatwg-fetch" + "fetch": "imports-loader?this=>global!exports?global.fetch!whatwg-fetch" }) ],