Why i can't trun template7 from es6 to es5 use babel?


#1

.babel ,webpack.base.conf.js package.json configure as that:

{
“presets”: [
[“env”, {
“modules”: false,
“targets”: {
“browsers”: ["> 1%", “last 2 versions”, “not ie <= 6”],
“ios” : ‘7.0’,
“android” : ‘4.0’
}
}],
“stage-2”
],
“plugins”: [“transform-vue-jsx”, “transform-runtime”]
}

{
test: /.js$/,
loader: ‘babel-loader’,
include: [
resolve(‘src’),
resolve(‘node_modules/webpack-dev-server/client’),
resolve(‘node_modules/framework7’),
resolve(‘node_modules/framework7-vue’),
resolve(‘node_modules/template7’),
resolve(‘node_modules/dom7’),
]
}

“devDependencies”: {
“autoprefixer”: “^7.1.2”,
“babel-core”: “^6.22.1”,
“babel-helper-vue-jsx-merge-props”: “^2.0.3”,
“babel-loader”: “^7.1.1”,
“babel-plugin-syntax-jsx”: “^6.18.0”,
“babel-plugin-transform-runtime”: “^6.22.0”,
“babel-plugin-transform-vue-jsx”: “^3.5.0”,
“babel-preset-env”: “^1.3.2”,
“babel-preset-stage-2”: “^6.22.0”,
}

npm run build after created files has const,when run in android< 6 and ios <11 find White screen


#2

when i used on android 5.0, Uncaught SyntaxError: Unexpected reserved word.