Created
April 30, 2018 18:43
-
-
Save danielbischoff/8b196cf4952d5c333c4e17b6438b2e01 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'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