Webpack hot reload not working

javascript

#1

Hello,
I am new here in c9. What I am trying to do is hot reloading with webpack. Unfortunately it doesn’t work, I have to manually refresh the page every time i change my source files. In my pc, I usually run following command: “webpack-dev-server --content-base src” and then run localhost:8080 and it´s working. Is it even possible to run webpack hot reloading with c9? I have even found some topic where the same problem were discussed (link), but it doesn’t work for me at all.

My webpack.config.js file:
> > module.exports = {
> > entry: ‘./entry.js’,
> > output: {
> > filename: ‘bundle.js’
> > },
> > devtool: ‘source-map’,
> > module: {
> > loaders: [
> > {
> > test: /.css$/,
> > loader: ‘style!css!’
> > }
> > ]
> > }
> > };

My package.json file:
> > {
> > “name”: “webpack-start”,
> > “version”: “0.0.0”,
> > “description”: “webpack test”,
> > “author”: “Thor”,
> > “license”: “Apache-2.0”,
> > “devDependencies”: {
> > “css-loader”: “^0.23.1”,
> > “style-loader”: “^0.13.1”,
> > “webpack-dev-server”: “^1.9.0”
> > },
> > “dependencies”: {
> > “moment”: “^2.10.3”
> > }
> > }

Thank you.


#2

I haven’t used webpack myself and I’m not familiar with the webpack dev server package, but it could be similar to this problem. At least your linked issue on GitHub indicates that you have to pass through the IP and port of your environment, because you can’t run from localhost:8080 on c9 (because it’s a remote VM, you are not the “local host”).