@click don't work well in UC browser

yuicer
0
yuicer
commented 2 years ago

env:
UC browser android
webpage:
http://zh.nuxtjs.org
error:
click event is not work for the navigation on the top right corner

0
pi0
28.3k
pi0
commented 2 years ago

Hi. I think the problem is with js incompatibility of older browsers like UC. We have introduced some out-of-the box improvements for next release. Hope it will help, else you need adding bable-polyfill in your project for more browsers compatibility.

0
xianweics
0
xianweics
commented 2 years ago

Same problem…

0
yuicer
0
yuicer
commented 2 years ago

@pi0 may i ask when the next version will publish? and how to config the babel-polyfill? thx!

0
SzHeJason
16
SzHeJason
commented 2 years ago

UC browser not support es6

  nuxt.config.js 
  extend(config, { isClient }) {
      if (isClient) {
        config.entry.vendor.push("babel-polyfill");
      }
      return config;
    },
0
xianweics
0
xianweics
commented 2 years ago

@SzHeJason The way I used and got an error.
nuxt:build Generating files… +16ms
nuxt:build Generating routes… +7ms
nuxt:build Adding webpack middleware… +61ms
(node:5648) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): ReferenceError: path is not defined

0
pi0
28.3k
pi0
commented 2 years ago

Please use something link this:

build: {
  extend(config, { isClient }) {
      if (isClient) {
        config.entry.vendor. unshift('babel-polyfill');
      }
   }
}
0
xianweics
0
xianweics
commented 2 years ago

@pi0 It still doesn't work…

0
HADB
0
HADB
commented 2 years ago

same problem, not work even added babel-polyfill

0
SzHeJason
16
SzHeJason
commented 2 years ago

don't worry. it just doesn't work in the local environment

1
xianweics
0
xianweics
commented 2 years ago
0
Informations
QuestionUnresolved
#c1014 - Created 2 years ago