close

How to determine the installed webpack version

Hello Guys, How are you all? Hope You all Are Fine. Today we are going to learn How to determine the installed webpack version in javascript. So Here I am Explain to you all the possible methods here.

Without wasting your time, Let’s start This Article.

How to determine the installed webpack version ?

  1. How to determine the installed webpack version ?

    to determine the installed webpack version For those who are using yarn
    yarn list webpack will do the trick
    $ yarn list webpack yarn list v0.27.5 └─ [email protected] Done in 1.24s.

  2. How to determine the installed webpack version ?

Method 1


For those who are using yarn

yarn list webpack will do the trick

$ yarn list webpack
yarn list v0.27.5
└─ [email protected]
Done in 1.24s.

Method 2

In CLI

$ webpack --version
    
webpack-cli 4.1.0
    
webpack 5.3.2

In Code (node runtime)

process.env.npm_package_devDependencies_webpack // ^5.3.2

or

process.env.npm_package_dependencies_webpack // ^5.3.2

In Plugin

compiler.webpack.version // 5.3.2

Summery

It’s all About this article. Hope all method helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which method worked for you? Thank You.

Leave a Comment