VUE-CLI 3.0.3, configuring the basic Environment and packaging

Source: Internet
Author: User
From new project to provisioning packaging environment
1.vue create vue-cli-env2.新建 vue.config.js 文件,设置baseUrl: ‘./‘3.新建各个环境的文件,例如:.env.development .env.test .env.production4.在 package.json 中设置打包命令,例如:build:development build:test build:production,在执行命令的语句中设置 mode 环境,例如:--mode test
Considerations for Environment variables
* 环境名应该与环境文件统一* 环境文件放置根目录下* 除了 baseUrl 和 NODE_ENV 其他环境变量使用 VUE_APP 开头

gitlab地址:https://github.com/lankongmoxing/vue-cli-3.0.3-build-env

VUE-CLI 3.0.3, configuring the basic Environment and packaging

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.