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)