Skip to content
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

fix: watch mode and options #1931

Merged
merged 9 commits into from Oct 13, 2020
Merged

fix: watch mode and options #1931

merged 9 commits into from Oct 13, 2020

Conversation

alexander-akait
Copy link
Member

@alexander-akait alexander-akait commented Oct 12, 2020

What kind of change does this PR introduce?

bugfix

Did you add tests for your changes?

Yes

If relevant, did you update the documentation?

No need

Summary

fixes #1923

Does this PR introduce a breaking change?

No

Other information

We need more tests on this, especial multi compiler mode

stdin is broken, I will fix it in other PR

@alexander-akait
Copy link
Member Author

alexander-akait commented Oct 13, 2020

I hate node and windows, but found hacky solution

@gianlucalarizza
Copy link

gianlucalarizza commented Oct 21, 2020

@evilebottnawi, sorry about this question. Have you merged? With the webpack-cli version ":" ^ 4.1.0 ", I always have the problem. Thanks so much for all your work.

@alexander-akait
Copy link
Member Author

@gianlucalarizza No problems with 4.1.0

@gianlucalarizza
Copy link

@evilebottnawi
thanks for the reply but i still have the same problem.

The only place I have the --watch is in the package.json and not in the webpack configuration options
For example: "npm --progress --watch --config webpack.development.js",

@alexander-akait
Copy link
Member Author

Because npm is not our binary

@gianlucalarizza
Copy link

@evilebottnawi
sorry for the lack of knowledge and the different questions. What would your binary be? I can try to understand if I can change. thankssss

@alexander-akait
Copy link
Member Author

webpack --progress --watch --config webpack.development.js

@gianlucalarizza
Copy link

gianlucalarizza commented Oct 21, 2020

@evilebottnawi
In console:

npm run watch

webpack --progress --watch --config webpack.development.js

(node:16064) [DEP_WEBPACK_WATCH_WITHOUT_CALLBACK] DeprecationWarning: A 'callback' argument need to be provided to the 'webpack(options, callback)' function when the 'watch' option is set. There is no way to handle the 'watch' option without a callback.

@alexander-akait
Copy link
Member Author

@gianlucalarizza remove watch: true from your config, you don't need this because you already run --watch

@gianlucalarizza
Copy link

@evilebottnawi :) in my package json i have

"scripts": {
"watch": "webpack --progress --config webpack.development.js",
"build": "webpack --progress --mode production --config webpack.production.js",

If in my command line I try to remove --watch, it's works fine but i don't have [webpack-cli] watching files for updates...

Consider that in the webpack configuration file I have not put the watch option

@alexander-akait
Copy link
Member Author

You need to remove watch: true in the config file, please read docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Watch mode issue] Webpack watch not working with webpack-cli@4
3 participants