Steps to install Webpack using the command line

不言
Release: 2018-08-18 15:08:50
Original
1644 people have browsed it

This article brings you the steps to install Webpack using the command line. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to you.

Weback command line installation

Step one:

npm install webpack -g           //全局安装
Copy after login

Step two:

npm init                  //初始化
Copy after login

Step three:

npm install –save-dev webpack           //项目目录的安装  –save-dev是在开发中使用,-save要保存到package.json里面
Copy after login

Step 4:

webpack -v        //检查版本号
Copy after login

Extension:

npm install When installing an npm package, there are two command parameters that can write their information into package.json files, one is npm install –save The other one is npm install –save-dev. The superficial difference between them is that –save will add the dependent package name to package.json file dependencies key, –save-dev is added to the package.json file devDependencies key The modules listed under devDependencies are what we use during development
The modules under dependencies are the modules we still need to rely on after publishing (that is, the dependent modules used in production)

Related recommendations:

webpack basics --Installation Tutorial

My Webpack Suite_html/css_WEB-ITnose

Webpack installation and basic packaging Detailed explanation of usage and command parameters

The above is the detailed content of Steps to install Webpack using the command line. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template