From abc462f666094ec139043080d33fdb43726fa7cc Mon Sep 17 00:00:00 2001 From: Jayden Seric Date: Tue, 29 Nov 2016 12:36:27 +1100 Subject: [PATCH] Updated dependencies and webpack config. --- package.json | 36 ++++++++++++++++++------------------ webpack.config.js | 32 +++++++++++++++++++------------- 2 files changed, 37 insertions(+), 31 deletions(-) diff --git a/package.json b/package.json index 9e1753a..3e80935 100644 --- a/package.json +++ b/package.json @@ -25,34 +25,34 @@ "start": "zoo node server" }, "dependencies": { - "babel-runtime": "^6.11.6", + "babel-runtime": "^6.18.0", "compression": "^1.6.2", "express": "^4.14.0", "radium": "^0.18.1", - "react": "^15.3.1", - "react-dom": "^15.3.1", - "svgxuse": "^1.1.21" + "react": "^15.4.1", + "react-dom": "^15.4.1", + "svgxuse": "^1.1.23" }, "devDependencies": { - "babel-core": "^6.14.0", - "babel-eslint": "^6.1.2", - "babel-loader": "^6.2.5", + "babel-core": "^6.18.2", + "babel-eslint": "^7.1.1", + "babel-loader": "^6.2.8", "babel-plugin-transform-decorators-legacy": "^1.3.4", - "babel-plugin-transform-runtime": "^6.12.0", - "babel-preset-es2015": "^6.14.0", - "babel-preset-react": "^6.11.1", + "babel-plugin-transform-runtime": "^6.15.0", + "babel-preset-es2015": "^6.18.0", + "babel-preset-react": "^6.16.0", "babel-preset-react-hmre": "^1.1.1", - "babel-preset-stage-0": "^6.5.0", - "eslint": "^3.4.0", - "eslint-config-standard": "^6.0.0", - "eslint-config-standard-react": "^4.0.0", - "eslint-plugin-promise": "^2.0.1", - "eslint-plugin-react": "^6.2.0", - "eslint-plugin-standard": "^2.0.0", + "babel-preset-stage-0": "^6.16.0", + "eslint": "^3.11.1", + "eslint-config-standard": "^6.2.1", + "eslint-config-standard-react": "^4.2.0", + "eslint-plugin-promise": "^3.4.0", + "eslint-plugin-react": "^6.7.1", + "eslint-plugin-standard": "^2.0.1", "file-loader": "^0.9.0", "rimraf": "^2.5.4", "webpack": "^2.1.0-beta.20", - "zoo": "^0.1.8" + "zoo": "^0.1.9" }, "babel": { "presets": [ diff --git a/webpack.config.js b/webpack.config.js index 2a35a63..2bc2327 100755 --- a/webpack.config.js +++ b/webpack.config.js @@ -4,26 +4,32 @@ const webpack = require('webpack') const config = { entry: './src/client.jsx', output: { - path: path.resolve('./public/bundle'), + path: path.resolve(__dirname, 'public/bundle'), publicPath: '/bundle/', filename: 'bundle.js' }, module: { - loaders: [{ - test: /\.(js|jsx)$/, - exclude: /node_modules/, - loader: 'babel', - query: { - cacheDirectory: true + rules: [ + { + test: /\.(js|jsx)$/, + exclude: /node_modules/, + use: 'babel-loader', + options: { + cacheDirectory: true + } + }, + { + test: /\.svg$/, + use: 'file-loader' } - }, { - test: /\.svg$/, - loader: 'file' - }] + ] }, resolve: { - extensions: ['.js', '.jsx'], - modules: [path.resolve('./src'), 'node_modules'] + modules: [ + 'node_modules', + path.resolve(__dirname, 'src') + ], + extensions: ['.js', '.jsx'] }, plugins: [ new webpack.EnvironmentPlugin(['NODE_ENV'])