Skip to content

Commit a34c4f2

Browse files
committed
Working on issue #68, configuring webpack
1 parent d6cdcab commit a34c4f2

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎18 ReactHotLoader/webpack.config.js‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ module.exports = {
1414
extensions: ['', '.js', '.ts', '.tsx']
1515
},
1616

17+
// Toake into account: remove hot loading entry points in production
1718
entry: [
19+
'webpack-dev-server/client?http://localhost:3000',
20+
'webpack/hot/only-dev-server',
1821
'./index.tsx',
1922
'./css/site.css',
2023
'../node_modules/toastr/build/toastr.css',
@@ -42,7 +45,7 @@ module.exports = {
4245
{
4346
test: /\.(ts|tsx)$/,
4447
exclude: /node_modules/,
45-
loader: 'ts-loader'
48+
loaders: ['react-hot','ts-loader']
4649
},
4750
//Note: Doesn't exclude node_modules to load bootstrap
4851
{
@@ -64,6 +67,7 @@ module.exports = {
6467
},
6568

6669
plugins:[
70+
new webpack.HotModuleReplacementPlugin(),
6771
//Generate index.html in /dist => https://github.com/ampedandwired/html-webpack-plugin
6872
new HtmlWebpackPlugin({
6973
filename: 'index.html', //Name of file in ./dist/

0 commit comments

Comments
 (0)