Home > Web Front-end > JS Tutorial > body text

Detailed explanation of the use of webpack

php中世界最好的语言
Release: 2018-03-14 09:29:04
Original
1263 people have browsed it

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
Copy after login

2.Use initialization

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

3.Install webpack

// 安装Webpacknpm install --save-dev webpack
Copy after login

4.Use the packaging command in the terminal

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

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!

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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!