Webpack and Vue load-on-demand components, console, grab packs

Source: Internet
Author: User

1, Webpack and Vue on-demand loading components

Webpack's unique way of lazy loading files greatly improves the performance of Webpack packaged spa applications.

And from Webpack2 onwards,require.ensure已经被import()替换。

Const RECOMMEND = (resolve) + = {  import (' Components/recommend/recommend '). Then (module) = {    Resolve (module)  })}

Export default New Router ({
Routes: [{
Path: '/recommend ',
Component:recommend
}]
})

The Promise object is returned.

2. Console

Mobile testing is much more difficult than PC-side, because there is no console and many error messages are not known.

Because of browser differences, there is a good chance that some methods are incompatible or other problems, but there is no console

Error, can only rely on speculation and confirmation to locate the problem, or directly print to the background to implement the front-end log, but these

is a lot of work, it is possible to directly be a project, such as monitoring projects, such as project engineering, but sometimes these

is very unrealistic, because of the cost of personnel resources.

Instead, use tools such as vconsole to implement development environment mobile print console logs to view issues and more.

Information

Import vconsole from ' Vconsole 'new vconsole ()

3. Charies Grasping Bag

Charles is actually a proxy server, by becoming a computer or browser agent, and then intercept requests and request results to reach the purpose of the analysis of the packet capture.

Information

Webpack and Vue load-on-demand components, console, grab packs

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.