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