should rebuild on change
this is my webpack.config.js
var path = require("path");
module.exports = {
context: __dirname,
entry: './app/app.js',
output: {
path: __dirname + "/dist",
filename: 'bundle.js'
},
module: {
loaders: [
{ test: /\.js$/, exclude: /node_modules/, loader: "babel-loader"}
]
}
}
if i execute webpack --watch everything work and when i modify a file it rebuild, but if i run webpack-dev-server when i change a file it recognize the change and it does something, this is the terminal output
webpack: bundle is now INVALID.
Hash: 0c7ded6cd59f303a190f
Version: webpack 1.12.2
Time: 20ms
chunk {0} bundle.js (main) 325 bytes
[0] ./app/app.js 325 bytes {0} [built]
webpack: bundle is now VALID.
but no bundle.js is generated
Are you running the dev server with any arguments?
webpack-dev-server does not generate files on disk, but keeps them in memory, can be a bit confusing at start, but that is because it is faster.
You need to load the file from the server that webpack-dev-server starts.
thanks, i didn't understand that everything was saved in memory and served under the publicPath defined in the webpack configuration.