Vue's Webpack lazy loading

Source: Internet
Author: User

A complete project is inseparable from the development environment Environment test environment These three environments first explain the implications of these three environments
开发环境:开发环境是程序猿们专门用于开发的服务器,配置可以比较随意,为了开发调试方便,一般打开全部错误报告。测试环境:一般是克隆一份生产环境的配置,一个程序在测试环境工作不正常,那么肯定不能把它发布到生产环境上。生产环境:是指正式提供对外服务的,一般会关掉错误报告,打开错误日志。
Next introduce the Webpack package Vue Project
1. Install NPM, this no longer repeats, and then execute NPM init in a directory, which initializes a project package, There is a Package.json file, this document must have a good understanding of the 2. And then install the Webpack, since we want to pack, we need to put webpack this tool installed, there are two types of installation, one is the global installation of a project is installed in the project, the Package.json directory The commands executed below are NPM install-g webpack and npm install--save-dev Webpack, where we install in the project and use the second installation Method 3. After installation we can see that there is a node_ in the project directory Module of the folder, then we can write our own project, we first set up an app and public folder, in the app to create a new two files, Test.js and Main.js, respectively, create a new index.html file in Pulic so that our basic project prototype will produce 4. We write a snippet in index.html: <! DOCTYPE html>
Finally, we introduce our project catalogue.

If you need to configure the following files for sub-environment packaging

Explain what each file does.
Define domain names and port numbers

To decide which environment to take

Definition of three environments

Configuring Interface Definitions

Configuring the Package Command

Vue's Webpack lazy loading

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.