-
-
Notifications
You must be signed in to change notification settings - Fork 9.1k
Closed
Description
General Information:
webpack version: 1.13.2
OS: Windows 10 Anniversary Update and webpack is running in Windows Subsystem for Linux(The new bash on Ubuntu)
I"m trying to run webpack in watch mode by using:
webpack --watch
and by also setting watch mode in config:
context: path.join(__dirname, '/src'),
devtool: debug ? 'inline-sourcemap' : null,
entry: './js-src/scripts.js',
watch: true,
module: {
All webpack does is run the transpiler and exit.
Example of output when running watch mode:
Hash: 045070ba2ed9ce40edf7
Version: webpack 1.13.2
Time: 2146ms
Asset Size Chunks Chunk Names
scripts.min.js 1.89 MB 0 [emitted] main
+ 172 hidden modules
I'm not sure what i'm doing incorrect?
eteeselink, lynxtaa, actuallymentor, madhead, bernaborrero and 12 more
Metadata
Metadata
Assignees
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
TheLarkInn commentedon Sep 4, 2016
mastrauckas commentedon Sep 4, 2016
Since I think it's a possible issue I think this is the appropriate place because it might be an issue.: Full webpack config:
Thanks!
sokra commentedon Sep 5, 2016
Probably chokidar has an issue with this...
TheLarkInn commentedon Sep 5, 2016
Their issue list has a few maybe related things. @mastrauckas is there any additional details that you think might be beneficial that we (you could also as well) could submit to @paulmillr?
mastrauckas commentedon Sep 5, 2016
@TheLarkInn I have no additional information. Should I just put a ticket on their issue list and refer back to this ticket?
paulmillr commentedon Sep 5, 2016
@mastercactapus I would be glad to help you (i've created chokidar). Are you able to set up a demo git repo that makes it easy to replicate the issue?
mastrauckas commentedon Sep 5, 2016
@paulmillr I can pull down any demo you want me too from git and run it. I might not be able to do it until tomorrow though.
25 remaining items
tsc --watch
is not supported on Windows 10 WSL microsoft/TypeScript#15328swordman1205 commentedon Jul 29, 2017
watchOptions: {
poll: true
}
Thank you. This solution works for me.
ankitrg commentedon Aug 11, 2017
I am on webpack 3, and I have poll option enabled, still Webpack picks up first few writes and then doesn't do that. I have tried saving the files via emacs and atom.
dzwiedziu-nkg commentedon Oct 27, 2017
I have similar problem on Linux Mint 18.2. After fix inotify issue works fun :)
toididau456 commentedon Feb 22, 2018
@lahdo thank you!
vladshlianin commentedon Jul 23, 2018
@lahdo I know, It's a ghost thread, but still - thank you, I've really struggled with this issue!
hijackthegit commentedon Aug 7, 2018
@lahdo thank you too, saved my day, literally!
barisusakli commentedon Feb 24, 2020
For anyone stumbling upon this when using the node API, having
In the webpack config didn't work for me, I had to feed it into the
compiler.watch
function, not sure if this is intended.ChrisTsou commentedon Apr 9, 2020
For googlers,
On wsl 2 you have to set poll,
poll: 1000
worked for me.zatloeri commentedon Oct 11, 2020
This just happened to me (Putting it here because this is where it led me).
The compilation starts and finishes without any error, but it does not continue to watch for changes.
It acts as if watch is disabled.
My
webpack.config.js
is:And I am running webpack via
NODE_ENV=development webpack
I found the problem in my case is combination of
If I change
webpack-cli
to version"^3.3.12"
and update my deps, then everything works as expected.Don't know why this is, but I hope it can help somebody solving the problem for themselves.
Also should mention that I am using:
alexander-akait commentedon Oct 11, 2020
@zatloeri Please create reproducible test repo and open an issue in webpack-cli
miadabdi commentedon Oct 23, 2020
I had this problem, just updated webpack-cli from 4.0.0 to 4.1.0 and it fixed it!
aaronamm commentedon Dec 29, 2020
@lahdo Thank you so much. It works.
Here is part of my Webpack setting.
FYI webpack watch option
https://webpack.js.org/configuration/watch/#watchoptionspoll
However, but I still don't understand that I don't have to set this option when I use Windows.
If someone can explain, I will appreciate it.
Thanks.