aboutsummaryrefslogtreecommitdiffstats
path: root/build/webpack.dev.conf.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2017-01-15 18:24:09 -0800
committerAdam Soltys <[email protected]>2017-01-15 18:24:09 -0800
commit7762ceaa7e2bb34f8758e17a4c8f512fa6a81b9e (patch)
tree91bb1d1b8fe6ad77a48f0e429d9bfd35834c78d9 /build/webpack.dev.conf.js
parent0ae266bf88f9f79c7e99b272688126898303daa4 (diff)
downloadcoinos-server-7762ceaa7e2bb34f8758e17a4c8f512fa6a81b9e.tar.gz
coinos-server-7762ceaa7e2bb34f8758e17a4c8f512fa6a81b9e.zip
Initial Vueification
Diffstat (limited to 'build/webpack.dev.conf.js')
-rw-r--r--build/webpack.dev.conf.js36
1 files changed, 36 insertions, 0 deletions
diff --git a/build/webpack.dev.conf.js b/build/webpack.dev.conf.js
new file mode 100644
index 00000000..cd52bf72
--- /dev/null
+++ b/build/webpack.dev.conf.js
@@ -0,0 +1,36 @@
+var config = require('../config')
+var webpack = require('webpack')
+var merge = require('webpack-merge')
+var utils = require('./utils')
+var baseWebpackConfig = require('./webpack.base.conf')
+var HtmlWebpackPlugin = require('html-webpack-plugin')
+
+// add hot-reload related code to entry chunks
+Object.keys(baseWebpackConfig.entry).forEach(function (name) {
+ baseWebpackConfig.entry[name] = ['./build/dev-client'].concat(baseWebpackConfig.entry[name])
+})
+
+module.exports = merge(baseWebpackConfig, {
+ module: {
+ loaders: [
+ utils.styleLoaders({ sourceMap: config.dev.cssSourceMap })
+ ]
+ },
+ // eval-source-map is faster for development
+ devtool: '#eval-source-map',
+ plugins: [
+ new webpack.DefinePlugin({
+ 'process.env': config.dev.env
+ }),
+ // https://github.com/glenjamin/webpack-hot-middleware#installation--usage
+ new webpack.optimize.OccurrenceOrderPlugin(),
+ new webpack.HotModuleReplacementPlugin(),
+ new webpack.NoErrorsPlugin(),
+ // https://github.com/ampedandwired/html-webpack-plugin
+ new HtmlWebpackPlugin({
+ filename: 'index.html',
+ template: 'index.html',
+ inject: true
+ })
+ ]
+})