You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That webpack-dev-server works with webpack-command.
Or if it specifically needs webpack-cli it's made an explicit dependency.
Actual Behavior
webpack-dev-server crashes as it's trying to directly access webpack-cli/bin/config-yargs.
> webpack-dev-server --mode development --hot
The CLI moved into a separate package: webpack-cli.
Please install 'webpack-cli' in addition to webpack itself to use the CLI.
-> When using npm: npm install webpack-cli -D
-> When using yarn: yarn add webpack-cli -D
module.js:549
throw err;
^
Error: Cannot find module 'webpack-cli/bin/config-yargs'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/xxx/node_modules/webpack-dev-server/bin/webpack-dev-server.js:65:1)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
For Bugs; How can we reproduce the behavior?
Create a project with webpack-command and without webpack-cli
For Features; What is the motivation and/or use-case for the feature?
The text was updated successfully, but these errors were encountered:
Going forward should we expect webpack-dev-server to only pair with webpack-cli and webpack-command to pair with webpack-serve?
My use case in this situation is not having the time to update my configs for webpack-serve at the moment, so I wanted to retain dev-server while having already moved to webpack-command. Might not be a common enough use case though.
webpack-serve has no dependency on webpack-command. The choice to have webpack-dev-server depend on the CLI for webpack was a poor design decision made many moons ago, but the ecosystem was much more tightly coupled back then, so it wasn't obvious. This does present a problem for people using webpack-dev-server, especially considering the effort to deprecate webpack-cli currently underway.
Code
N/A
Expected Behavior
That
webpack-dev-server
works withwebpack-command
.Or if it specifically needs
webpack-cli
it's made an explicit dependency.Actual Behavior
webpack-dev-server
crashes as it's trying to directly accesswebpack-cli/bin/config-yargs
.For Bugs; How can we reproduce the behavior?
Create a project with
webpack-command
and withoutwebpack-cli
For Features; What is the motivation and/or use-case for the feature?
The text was updated successfully, but these errors were encountered: