Home  >  Article  >  Web Front-end  >  Detailed explanation of the use of webpack

Detailed explanation of the use of webpack

php中世界最好的语言
php中世界最好的语言Original
2018-03-14 09:29:041256browse

This time I will bring you a detailed explanation of the use of webpack. What are the precautions when using webpack? The following is a practical case, let’s take a look.

1.Install

//全局安装npm install -g webpack//安装到你的项目目录npm install --save-dev webpack

2.Use initialization

npm init   //根据提示输入相应信息

3.Install webpack

// 安装Webpacknpm install --save-dev webpack

4.Use the packaging command in the terminal

webpack {entry file/入口文件} {destination for bundled file/存放bundle.js的地方}

5. Use webpack through configuration file I believe you have mastered the method after reading the case in this article. For more exciting information, please pay attention to other related articles on the php Chinese website!

Recommended reading:

How to implement node connection to mysql


JS regular expression

How to use

The above is the detailed content of Detailed explanation of the use of webpack. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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