Created
September 11, 2016 20:59
-
-
Save tomduncalf/b2ff8408109708a2ef3999435cf710a9 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
var webpack = require('webpack'); | |
var path = require('path'); | |
var WebpackNotifierPlugin = require('webpack-notifier'); | |
module.exports = { | |
devtool: 'eval', | |
entry: [ | |
// Add the react hot loader entry point - in reality, you might only want this in your dev config | |
'react-hot-loader/patch', | |
'webpack-dev-server/client?http://localhost:3000', | |
'webpack/hot/only-dev-server', | |
'index.tsx' | |
], | |
output: { | |
filename: 'app.js', | |
publicPath: '/dist', | |
path: path.resolve('dist') | |
}, | |
resolve: { | |
extensions: ['', '.ts', '.tsx', '.js', '.jsx'], | |
modulesDirectories: ['src', 'node_modules'], | |
}, | |
module: { | |
loaders: [ | |
{ test: /\.tsx?$/, loaders: ['babel', 'ts-loader'] }, | |
{ test: /\.jsx?$/, loaders: ['babel'] } | |
] | |
}, | |
plugins: [ | |
// Add the HMR plugin | |
new webpack.HotModuleReplacementPlugin(), | |
new WebpackNotifierPlugin({ alwaysNotify: true }), | |
] | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment