Using Vue.js development in the VS2017 development app to encounter packaged Android files that are not working properly in the low version of Android (4.3)

Source: Internet
Author: User

A collection of issues encountered by app apps that use VS2017 to develop Vue

1, packaged apk file in Android 6.0 version above the phone can open normally on Android 4.3 version of the phone cannot be opened

Cause: The first guess is not that the VS Android setting is incorrect, and finally the problem is that the low version of the built-in browser (webview) version is too low to parse the latest syntax for ES2015. You need to configure Babel-loader in Webpack, and you need to add a. babelrc file to the outermost layer of the project to Babel special syntax in the default resolution ES2015 (for example: Const,let, etc.)

Solution: Add the. Bablerc in the outermost layer and add it to the file:

{

"Presets": ["es2015"]

}

In the wabpack webpack.config.js configuration file, add:

{

Test:/\.jsx?$/,

Test:/(\.jsx|\.js) $/

, loader: "Babel-loader"

}

Detailed configuration information is as follows:

<binding clean= ' run-development '/>

"Use strict";

Module.exports = {

Entry: "./www/sources/main.js",

Output: {

FileName: "Build.js"

, Path: __dirname + '/www/dist '

, Publicpath: './dist/',

},

Externals: {

"BMap": "BMap"

},

Devserver: {

Contentbase: ".",

Host: "LocalHost",

port:9000

//},

Module: {

Loaders: [

{

Test:/\.jsx?$/,

Test:/(\.jsx|\.js) $/

, loader: "Babel-loader"

},

{

Test:/\.vue?$/,

Loader: "Vue-loader"

}, {

Test:/\.css?$/,

Use: [

{

Loader: "Style-loader"

}, {

Loader: "Css-loader"

}

]

}, {

Test:/\. (png|jpg) $/,

Loader: ' Url-loader?limit=8192&name=images/[hash:8]. [Name]. [ext] '

}, {

Test:/\. (Eot|woff) $/

, loader: "File-loader"

}

]

}

};

Using Vue.js development in the VS2017 development app to encounter packaged Android files that are not working properly in the low version of Android (4.3)

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.