git ssb

0+

dangerousbeans / etherstreams



Tree: 5b2e405d30a0a28a8d6b43dd4ec8b16cdba28cf8

Files: 5b2e405d30a0a28a8d6b43dd4ec8b16cdba28cf8 / build / webpack.dev.conf.js

1225 bytesRaw
1var utils = require('./utils')
2var webpack = require('webpack')
3var config = require('../config')
4var merge = require('webpack-merge')
5var baseWebpackConfig = require('./webpack.base.conf')
6var HtmlWebpackPlugin = require('html-webpack-plugin')
7var FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin')
8
9// add hot-reload related code to entry chunks
10Object.keys(baseWebpackConfig.entry).forEach(function (name) {
11 baseWebpackConfig.entry[name] = ['./build/dev-client'].concat(baseWebpackConfig.entry[name])
12})
13
14module.exports = merge(baseWebpackConfig, {
15 module: {
16 rules: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap })
17 },
18 // cheap-module-eval-source-map is faster for development
19 devtool: '#cheap-module-eval-source-map',
20 plugins: [
21 new webpack.DefinePlugin({
22 'process.env': config.dev.env
23 }),
24 // https://github.com/glenjamin/webpack-hot-middleware#installation--usage
25 new webpack.HotModuleReplacementPlugin(),
26 new webpack.NoEmitOnErrorsPlugin(),
27 // https://github.com/ampedandwired/html-webpack-plugin
28 new HtmlWebpackPlugin({
29 filename: 'index.html',
30 template: 'index.html',
31 inject: true
32 }),
33 new FriendlyErrorsPlugin()
34 ]
35})
36

Built with git-ssb-web