Project scaffolding: vue-cli 3.x, using vue + vue-router + iview
iview for on-demand introduction, using: Row, Col, Button, Carousel, CarouselItem, Icon
problem description
problem: access is normal in the high version browser, but it is accessed in Android 4.4.4 webview (kernel is Chrome 33). The page is blank, and the debug error is
.Uncaught SyntaxError: Use of const in strict mode. app.js:4328
./node_modules/iview/src/utils/assist.js app.js:4328
__webpack_require__ app.js:768
fn app.js:131
./node_modules/cache-loader/dist/cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js?!./node_modules/iview/src/components/carousel/carousel.vue?vue&type=script&lang=js& app.js:1001
__webpack_require__ app.js:768
fn app.js:131
./node_modules/iview/src/components/carousel/carousel.vue?vue&type=script&lang=js& app.js:4103
__webpack_require__ app.js:768
fn app.js:131
./node_modules/iview/src/components/carousel/carousel.vue app.js:4091
__webpack_require__ app.js:768
fn app.js:131
./node_modules/iview/src/components/carousel/index.js app.js:4127
__webpack_require__ app.js:768
fn app.js:131
./src/plugins/iview.js app.js:5328
__webpack_require__ app.js:768
fn app.js:131
./src/main.js app.js:5316
__webpack_require__ app.js:768
fn app.js:131
(anonymous function) app.js:5412
__webpack_require__ app.js:768
(anonymous function) app.js:904
(anonymous function)
try to solve
the error in reading the newspaper may be an ES6+ grammar problem, so try to use the third way:
by adding polyfill, press ide/browser-compatibility.html-sharppolyfill" rel=" nofollow noreferrer "> vue-cli 3.x documentation polyfill related guidelines .babel.config.js:
presets: [
["@vue/app", {
useBuiltIns: "entry"
}]
]
main.js:
import "@babel/polyfill"
.browserslistrc:
chrome >= 33
android >= 4.4
the test problem was not solved
related links
ask for guidance, ask for advice