Vue+vux+es6+webpack Mobile Side Common configuration steps

Source: Internet
Author: User

1. Create a project (the process of the Vue project is not much to say)
2.CNPM Install Vux--save
3. In the build/webpack.base.conf.js configuration:
Const Vuxloader = require (' Vux-loader ')
Put the first module.exports assignment variable let webpackconfig ={inside the code does not move}
And this one on the bottom.

Module.exports = Vuxloader.merge (webpackconfig, {plugins: [' Vux-ui ', ' progress-bar ', ' Duplicate-style ') ]})

4. InstallationVux-loaderUsing commandscnpm Install vux-loader-d
5. cnpm Install less less-loader--save-dev To compile correctly LessSource
6.cnpm Install Yaml-loader--save-devTo correctly read the language file
7.index.htmlPortal page<meta name= "viewport" content= "width=device-width,initial-scale=1,user-scalable=0" >
8.Main.jsInside Configuration:
(Requires installation of dependentcnpm Install Fastclick--save
Const Fastclick = require (' Fastclick ')
Fastclick.attach (document.body)Remove the click Delay for 300 seconds
(Requires installation of dependentcnpm Install Axios--save
Const Axios = require (' Axios ')
vue.prototype. $ajax = Axios;
9.index.htmlInside introducedthe REM adaptive layout of JS, it is necessary to useJQare also introduced here to ensure performance.

Vue+vux+es6+webpack Mobile Side Common configuration steps

Related Article

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.