Answer the question
In order to leave comments, you need to log in
Why doesn't webpack --watch work?
Under Windows, I run webpack --watch , the assembly takes place, but there is no monitoring for changes.
Sources here https://github.com/volkovpv/webpack-not-watch
Why is this happening and how to fix it?
Answer the question
In order to leave comments, you need to log in
I see the question is already a long-standing one .. maybe the author himself found the answer and just didn’t write here?
I found only that if you are on a Windows, then this problem is common.
For the second day I have been trying to somehow solve this problem and everything seems to be going to a successful finale .
At first I thought that I was writing something wrong, after all, I use webpack for the first time. I cloned several repositories for myself, the result is the same. Watcher starts successfully, but file changes do not provoke a rebuild of the project. Although for the same Ilya Kantor everything works fine on a poppy .
One idea came to mind - running webpack via gulp plugin. Gulp is going with a bang. And the watcher does not freeze there.
All the same, webpack is a new tool for me, and therefore I will do it according to the last video from the gulp screencast, again from Ilya Kantor
. And it really works for me. What's wrong, I frankly don't understand. Separately, webpack does not monitor files, but in conjunction with gulp everything works fine.
As an example, I bitbucketed that minimalistic project that I got by crossing the beginning of the screencast about webpack (there I got to what seems to be the third video) and the most recent video from the screencast on gulp .
This is how I discovered America.
I myself still have a hard time understanding this, so do not kick much)
Thank you!
I also follow the Webpack lessons from the cantor.
watch didn't work like this:
module.exports = {
context: __dirname + '/frontend',
entry: {
home: './home',
about: './about'
//header: './header'
},
var path = require("path");
module.exports = {
//context: path.resolve(__dirname, "frontend") ,
entry: {
home: path.resolve(__dirname, "frontend",'home'),
about: path.resolve(__dirname, "frontend",'about')
//header: './header'
},
....
Ran your example, tracking works ( Webpack 1.13.2 ).
webpack.config.js :
module.exports = {
entry: "./home",
output: {
filename: "build.js"
}
};
context: __dirname + "./modules",
. context: __dirname + "\\modules",
. process.cwd()
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question