Webpack -watch does not work or webpack-dev-server

It starts to confuse me. I spend too much time trying to get webpack to work, watch and upload my files. I looked through several links and tried to solve them, but this does not fix the problem. I am wondering if this has more to do with my settings and permissions than with the web package, so I thought I would bite the bullet and send it here if someone has the same setting:

I start a live Ubuntu 14.04 session with an 8 gigabyte USB key and save the application files in the "src" folder inside the "Documents" folder. I use the Atom editor as an IDE.

When I go to the src folder and run "webpack --watch./app.js bundle.js" or "webpack-dev-server -inline -hot", they both start and give me good messages, such as because "webpack: build is now VALID ", but when I edit js in Atom and save it, it will not be automatically recompiled on either the browser page or the terminal. This makes no mistakes. He just does nothing.

I tried to delete and rename / recreate / move the src folder and check in case, but nothing changes. It compiles correctly when I switch to http: // localhost: 8080 , just without recompiling.

For someone else working through this, here are the 2 most useful links that should solve most problems like this, and I also included a very useful web upload video that I used. They just do not work in this particular case.

webpack --watch does not compile modified files

Why webpack --watch does not update when updating certain files

Youtube Video: An Introduction to Webpack with Jeremy Lund. Even with minimal js and webpack.config.js files, as shown in this example, I cannot get --watch to run. https://www.youtube.com/watch?v=RKqRj3VgR_c


Edit:

I opened the src folder while the webpack-dev server started in the console and manually edited the app.js file using the default text editor ubuntu instead of Atom. When I saved the file, the web package really recompiled and linked the files automatically and updated the browser. It seems the problem may be Atom? I am new to this.

+5
source share
1 answer

Win7, PhpStorm, Virtualbox: Ubuntu 14.04

I posed the same problem. Solution found: webpack --watch does not compile modified files

Run: webpack --watch --watch-poll Of course, remove 'watch: true' from the webpack configuration before this.

+2
source

All Articles