-
-
Notifications
You must be signed in to change notification settings - Fork 9.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
webpack watch mode not working.... #2949
Comments
|
Since I think it's a possible issue I think this is the appropriate place because it might be an issue.: Full webpack config: var debug = process.env.NODE_ENV !== 'production';
var path = require('path');
var webpack = require('webpack');
module.exports = {
context: path.join(__dirname, '/src'),
devtool: debug ? 'inline-sourcemap' : null,
entry: './js-src/scripts.js',
watch: true,
module: {
loaders: [
{
test: /.js?$/,
exclude: /(node_modules)|(bower_components)/,
loader: 'babel-loader',
query: {
presets: ['react', 'es2015', 'stage-0']
}
}
]
},
output: {
path: path.join(__dirname, '/src/wwwroot/static/js'),
filename: 'scripts.min.js'
},
plugins: debug ? [] : [
new webpack.optimize.DedupePlugin(),
new webpack.optimize.OccurenceOrderPlugin(),
new webpack.optimize.UglifyJsPlugin({ mangle: false, sourcemap: false }),
],
}; Thanks! |
Probably chokidar has an issue with this... |
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? |
@TheLarkInn I have no additional information. Should I just put a ticket on their issue list and refer back to this ticket? |
@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? |
@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. |
@paulmillr thank you very much!! |
@mastrauckas I think you have a typo |
@rafde Thanks for noticing that. I'll fix that tonight and see if it fixes the issue. |
@rafde That didn't fix the issue. @paulmillr what did you want me to demo? |
Would be great to have a demo repository where i'll be able to reproduce the issue simply without hassle and messing with configs. |
@paulmillr FWIW, I experience the exact same thing on a number of webpack projects in Windows Subsystem for Linux, which have wildly varying configs. Therefore I'm not sure prepping any particular repo will help. All that said, I share Sokra's hunch that this is either in chokidar or simply a core bug in this fancy new Windows feature. So I cloned chokidar, ran tests, got 19 passes and 76 failures (gist: https://gist.github.com/eteeselink/0c7394eab588d0851d8633cc0ade7c3f). Running the same tests on plain windows gives 0 test failures. Node 6.5.0 on both "platforms". Removed node_modules and re-did |
@paulmillr like @eteeselink said it might be an issue in the Windows Subsystem for Linux,. Here is a demo project https://github.com/mastrauckas/webpack-issue that is having the issue. I you need me to do anything else please let me know. |
What about webpack tests? Does everything pass on the subsystem? |
@paulmillr here is the result of running |
@paulmillr here is also the result of running |
68 failing tests for webpack. Basically this means Windows subsystem for Linux is broken and shitty. I'll see what we can do here but a more robust solution would be to cease using it until Windows developers would fix all issues. |
@paulmillr that's a perfectly valid solution for me, FWIW. WSL is beta so some incompatibilities are to be expected, i guess. I just discovered it's a known bug in WSL: microsoft/WSL#216. If I were @sokra I'd close this bug until MS fixes inotify. For people who find this webpack issue, the issue linked above lets you vote on this on UserVoice: https://wpdev.uservoice.com/forums/266908-command-prompt-console-bash-on-ubuntu-on-windo/suggestions/13469097-support-for-filesystem-watchers-like-inotify |
I'm going to reply to the bug @eteeselink put a like to. |
microsoft/WSL#216 has been closed |
I've unistalled Bash on Windows 10 and module.exports = {
entry: './entry.js',
output: {
path: __dirname,
filename: "bundle.js"
}
}; Path to project is
|
Nevermind... The problem was the |
Moved to webpack/watchpack#43. |
Try this workaround: Add this to your webpack configuration file:
|
watchOptions: { Thank you. This solution works for me. |
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. |
I have similar problem on Linux Mint 18.2. After fix inotify issue works fun :) |
@lahdo thank you! |
@lahdo I know, It's a ghost thread, but still - thank you, I've really struggled with this issue! |
@lahdo thank you too, saved my day, literally! |
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
|
For googlers, |
This just happened to me (Putting it here because this is where it led me). My
And I am running webpack via I found the problem in my case is combination of
If I change
|
@zatloeri Please create reproducible test repo and open an issue in webpack-cli |
I had this problem, just updated webpack-cli from 4.0.0 to 4.1.0 and it fixed it! |
@lahdo Thank you so much. It works.
|
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:
and by also setting watch mode in config:
All webpack does is run the transpiler and exit.
Example of output when running watch mode:
I'm not sure what i'm doing incorrect?
The text was updated successfully, but these errors were encountered: