Skip to content

Instantly share code, notes, and snippets.

@danielbischoff
Created April 30, 2018 18:43
Show Gist options
  • Save danielbischoff/8b196cf4952d5c333c4e17b6438b2e01 to your computer and use it in GitHub Desktop.
Save danielbischoff/8b196cf4952d5c333c4e17b6438b2e01 to your computer and use it in GitHub Desktop.
'use strict';
const fs = require('fs');
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const webpack = require('webpack');
const config = {
mode: 'development',
entry: [
'webpack/hot/dev-server',
'webpack-dev-server/client?http://localhost:9000/',
'./src/index.js'
],
output: {
path: path.resolve(__dirname, 'dist'),
filename: '[name].[hash].js'
},
resolve: {
extensions: ['.js', '.jsx', ]
},
devtool: 'eval-cheap-module-source-map',
module: {
rules: [{
test: /\.jsx?$/,
include: paths.appSrc,
use: [{
loader: 'babel-loader',
options: babelOptions,
}, ],
},
]
},
plugins: [
new webpack.HotModuleReplacementPlugin(),
new HtmlWebpackPlugin({
template: paths.appHtml,
title: 'React Mobx Starter',
inject: 'body'
})
]
};
module.exports = config;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment