From 30652820fc681f41c859219f84edda869954a392 Mon Sep 17 00:00:00 2001 From: Hsiaoming Yang Date: Wed, 11 May 2016 15:40:24 +0900 Subject: [PATCH] Update dependencies & cleanup configuration --- package.json | 12 ++++++------ server.js | 24 ------------------------ webpack.config.js | 6 ++++-- 3 files changed, 10 insertions(+), 32 deletions(-) delete mode 100644 server.js diff --git a/package.json b/package.json index ed507ae..f50784b 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "UI framework for mobile built with vue.", "main": "src/index.js", "scripts": { - "start": "NODE_ENV=development node server.js", + "start": "webpack-dev-server --inline --hot", "build": "NODE_ENV=production webpack --progress --hide-modules", "test": "echo \"Error: no test specified\" && exit 1" }, @@ -25,13 +25,13 @@ "babel-loader": "^6.1.0", "babel-plugin-transform-runtime": "^6.1.4", "babel-preset-es2015": "^6.1.4", - "babel-runtime": "^5.8.0", - "css-loader": "^0.21.0", - "extract-text-webpack-plugin": "^0.9.1", + "babel-runtime": "^6.6.1", + "css-loader": "^0.23.0", + "extract-text-webpack-plugin": "^1.0.1", "postcss": "^5.0.14", "postcss-custom-properties": "^5.0.0", - "postcss-import": "^7.1.0", - "postcss-loader": "^0.7.0", + "postcss-import": "^8.1.2", + "postcss-loader": "^0.9.1", "style-loader": "^0.13.0", "vue": "^1.0.16", "vue-hot-reload-api": "^1.3.2", diff --git a/server.js b/server.js deleted file mode 100644 index c01afb3..0000000 --- a/server.js +++ /dev/null @@ -1,24 +0,0 @@ - -var webpack = require('webpack'); -var WebpackDevServer = require('webpack-dev-server'); -var config = require('./webpack.config'); - -config.entry.app.unshift("webpack-dev-server/client?http://localhost:9090", "webpack/hot/dev-server"); - -config.plugins.push(new webpack.HotModuleReplacementPlugin()); - -config.devtool = 'eval'; - -var app = new WebpackDevServer(webpack(config), { - contentBase: config.output.contentBase + '/_site', - publicPath: '/assets/', - historyApiFallback: true, - hot: true, -}); - -app.listen(9090, '0.0.0.0', function (err, result) { - console.log('http://localhost:9090'); - if (err) { - console.log(err); - } -}); diff --git a/webpack.config.js b/webpack.config.js index 9cc5e12..1430617 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,4 +1,3 @@ -var fs = require('fs') var webpack = require('webpack') var ExtractTextPlugin = require('extract-text-webpack-plugin') @@ -17,7 +16,6 @@ var options = { output: { path: contentBase + '/assets', filename: 'app.js', - contentBase: contentBase, }, module: { @@ -47,6 +45,10 @@ var options = { ] }, + devServer: { + path: contentBase + '/assets/_site', + }, + devtool: 'source-map', }