How to Determine the Installed Webpack Version
Especially During the Transition from Webpack V1 to V2, It Would Be Important to Programmatically Determine What Webpack Version Is Installed, but I Cannot...
Especially during the transition from webpack v1 to v2, it would be important to programmatically determine what webpack version is installed, but I cannot seem to find the appropriate API.
7 Answers
Version Installed:
Using webpack CLI: (--version, -v Show version number [boolean])
webpack --version
or:
webpack -v
Using npm list command:
npm list webpack
Results in name@version-range:
<projectName>@<projectVersion> /path/to/project
└── webpack@<version-range>
Using yarn list command:
yarn list webpack