Last active
August 29, 2015 14:14
-
-
Save chochinlu/e44b5ee16d835843d1e5 to your computer and use it in GitHub Desktop.
webpack react livereload --> http://localhost:8080/webpack-dev-server/
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
{ | |
"name": "webpack-react-livereload", | |
"devDependencies": { | |
"jsx-loader": "^0.12.2", | |
"react-hot-loader": "^1.1.4", | |
"webpack": "^1.5.3", | |
"webpack-dev-server": "^1.7.0" | |
} | |
} |
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'); | |
module.exports = { | |
resolve: { | |
extensions: ['', '.js', '.jsx'] | |
}, | |
entry: [ | |
'webpack-dev-server/client?http://0.0.0.0:3000', | |
'webpack/hot/only-dev-server', | |
'./client.js'], | |
output: { | |
path: __dirname+'/build/js', | |
filename: 'client.js', | |
publicPath: 'http://0.0.0.0:3000/build/js/' | |
}, | |
plugins: [ | |
new webpack.HotModuleReplacementPlugin(), | |
new webpack.NoErrorsPlugin() | |
], | |
module: { | |
loaders: [ | |
{ test: /\.jsx$/, loaders: ['react-hot', 'jsx-loader'] } | |
] | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment