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